+ TabooLibLoader fixed.

This commit is contained in:
坏黑 2018-11-04 15:42:10 +08:00
parent 271f1b56b0
commit b8ab5ebc1a

View File

@ -39,6 +39,7 @@ public class TabooLibLoader implements Listener {
static Map<String, List<Class>> pluginClasses = Maps.newHashMap();
static List<Loader> loaders = Lists.newArrayList();
static List<Runnable> tasks = Lists.newArrayList();
static boolean started;
static void setup() {
testInternet();
@ -91,8 +92,12 @@ public class TabooLibLoader implements Listener {
}
public static void runTaskOnEnabled(Runnable runnable) {
if (Main.isStarted()) {
runnable.run();
} else {
tasks.add(runnable);
}
}
static boolean isLoader(Class pluginClass) {
return !Loader.class.equals(pluginClass) && Loader.class.isAssignableFrom(pluginClass);