client: add com.openosrs.client.plugins to scanner

This commit is contained in:
TheRealNull
2021-01-04 00:53:48 -05:00
parent 751d2c1c6e
commit 8edd721b1e
9 changed files with 33 additions and 62 deletions

View File

@@ -30,7 +30,6 @@ import com.google.common.annotations.VisibleForTesting;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.openosrs.client.plugins.BuiltInPluginManager;
import java.io.File;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
@@ -390,9 +389,6 @@ public class RuneLite
overlayManager.add(tooltipOverlay.get());
}
//Load built-in OPRS plugins
BuiltInPluginManager.loadPlugins();
// Start plugins
pluginManager.startPlugins();

View File

@@ -87,6 +87,7 @@ public class PluginManager
* Base package where the core plugins are
*/
private static final String PLUGIN_PACKAGE = "net.runelite.client.plugins";
private static final String OPENOSRS_PACKAGE = "com.openosrs.client.plugins";
private final boolean developerMode;
private final boolean safeMode;
@@ -290,6 +291,10 @@ public class PluginManager
.map(ClassInfo::load)
.collect(Collectors.toList());
plugins.addAll(classPath.getTopLevelClassesRecursive(OPENOSRS_PACKAGE).stream()
.map(ClassInfo::load)
.collect(Collectors.toList()));
loadPlugins(plugins, (loaded, total) ->
SplashScreen.stage(.60, .70, null, "Loading Plugins", loaded, total, false));
}