+ TabooLibLoader fixed.
This commit is contained in:
parent
271f1b56b0
commit
b8ab5ebc1a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user