diff --git a/src/main/java/me/skymc/taboolib/TabooLibLoader.java b/src/main/java/me/skymc/taboolib/TabooLibLoader.java index 6a7333c..9f13fde 100644 --- a/src/main/java/me/skymc/taboolib/TabooLibLoader.java +++ b/src/main/java/me/skymc/taboolib/TabooLibLoader.java @@ -39,6 +39,7 @@ public class TabooLibLoader implements Listener { static Map> pluginClasses = Maps.newHashMap(); static List loaders = Lists.newArrayList(); static List tasks = Lists.newArrayList(); + static boolean started; static void setup() { testInternet(); @@ -91,7 +92,11 @@ public class TabooLibLoader implements Listener { } public static void runTaskOnEnabled(Runnable runnable) { - tasks.add(runnable); + if (Main.isStarted()) { + runnable.run(); + } else { + tasks.add(runnable); + } } static boolean isLoader(Class pluginClass) {