Skip to content

Commit

Permalink
Do not create reference of Mixin classes in Launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
SNWCreations committed Jul 24, 2023
1 parent abb586d commit 2384f37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/main/java/snw/kookbc/LaunchMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ private LaunchMain() {
blackboard = new HashMap<>();
}

@Override
protected void doSetup() {
MixinPluginManager.instance().loadFolder(AccessClassLoader.of(getCustomLoader()), new File("plugins"));
}

@Override
public ClassLoader getCustomLoader() {
return classLoader;
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/snw/kookbc/launcher/Launcher.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package snw.kookbc.launcher;

import snw.kookbc.impl.launch.AccessClassLoader;
import snw.kookbc.impl.plugin.MixinPluginManager;

import java.io.File;

/**
* 2023/7/17<br>
* KookBC<br>
Expand All @@ -22,7 +17,10 @@ public void onSetup() {
if (instance() != this) {
return;
}
MixinPluginManager.instance().loadFolder(AccessClassLoader.of(getCustomLoader()), new File("plugins"));
doSetup();
}

protected void doSetup() {
}

protected Launcher() {
Expand Down

0 comments on commit 2384f37

Please sign in to comment.