diff --git a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java index 375ee5f..54d5273 100644 --- a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java +++ b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java @@ -21,7 +21,7 @@ import com.redstoner.modules.Module; /** The module loader, mother of all modules. Responsible for loading and taking care of all modules. * * @author Pepich */ -@Version(major = 1, minor = 1, revision = 3, compatible = -1) +@Version(major = 1, minor = 2, revision = 0, compatible = -1) public final class ModuleLoader implements CoreModule { private static ModuleLoader instance; @@ -169,4 +169,13 @@ public final class ModuleLoader implements CoreModule Utils.sendMessage(sender, " ยง7", "For more detailed information, consult the debugger."); return true; } + + public static void disableModules() + { + for (Module m : modules) + { + if (m.enabled()) + m.onDisable(); + } + } } diff --git a/src/com/redstoner/misc/Main.java b/src/com/redstoner/misc/Main.java index 9e87e01..931fbeb 100644 --- a/src/com/redstoner/misc/Main.java +++ b/src/com/redstoner/misc/Main.java @@ -18,7 +18,7 @@ import com.redstoner.modules.warn.Warn; /** Main class. Duh. * * @author Pepich */ -@Version(major = 1, minor = 1, revision = 6, compatible = -1) +@Version(major = 1, minor = 2, revision = 0, compatible = -1) public class Main extends JavaPlugin { public static JavaPlugin plugin; @@ -42,4 +42,10 @@ public class Main extends JavaPlugin // And enable them ModuleLoader.enableModules(); } + + @Override + public void onDisable() + { + ModuleLoader.disableModules(); + } }