From 55badbb875ca656fe481d560a001b744746bec82 Mon Sep 17 00:00:00 2001 From: Pepich Date: Fri, 5 May 2017 10:07:37 +0200 Subject: [PATCH] Fixed modules not being removed from memory properly --- src/com/redstoner/coremods/moduleLoader/ModuleLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java index 71fe3a3..35f7e75 100644 --- a/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java +++ b/src/com/redstoner/coremods/moduleLoader/ModuleLoader.java @@ -37,7 +37,7 @@ import net.minecraft.server.v1_11_R1.MinecraftServer; /** The module loader, mother of all modules. Responsible for loading and taking care of all modules. * * @author Pepich */ -@Version(major = 3, minor = 2, revision = 0, compatible = 2) +@Version(major = 3, minor = 2, revision = 2, compatible = 2) public final class ModuleLoader implements CoreModule { private static ModuleLoader instance; @@ -132,6 +132,7 @@ public final class ModuleLoader implements CoreModule for (String s : coremods) if (!s.startsWith("#")) ModuleLoader.addDynamicModule(s); + enableModules(); for (String s : autoload) if (!s.startsWith("#")) ModuleLoader.addDynamicModule(s); @@ -509,6 +510,7 @@ public final class ModuleLoader implements CoreModule Utils.info("Player count: " + status[4]); Utils.info("Attempting to disable module properly:"); disableModule(m); + modules.remove(m); Utils.info("Disabled module, overriding the implementation:"); Object[] newStatus = getServerStatus(); Utils.info("Task complete! Took " + ((long) newStatus[0] - (long) status[0]) + "ms to finish!");