From 8082b3d33d4fb2f7c720402d89112999848fedc3 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 2 Dec 2012 17:03:43 +0100 Subject: [PATCH] TickTask changes applied to plugin. --- src/fr/neatmonster/nocheatplus/NoCheatPlus.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fr/neatmonster/nocheatplus/NoCheatPlus.java b/src/fr/neatmonster/nocheatplus/NoCheatPlus.java index a02aa158..f8ae007e 100644 --- a/src/fr/neatmonster/nocheatplus/NoCheatPlus.java +++ b/src/fr/neatmonster/nocheatplus/NoCheatPlus.java @@ -302,6 +302,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI { final PluginDescriptionFile pdfFile = getDescription(); // Stop the tickTask. + TickTask.setLocked(true); TickTask.cancel(); // Stop the lag measuring task. @@ -330,6 +331,9 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI { // Remove listener references. listenerManager.setRegisterDirectly(false); listenerManager.clear(); + + // More cleanup. + TickTask.purge(); // Tell the server administrator the we finished unloading NoCheatPlus. LogUtil.logInfo("[NoCheatPlus] Version " + pdfFile.getVersion() + " is disabled."); @@ -371,8 +375,11 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI { // Read the configuration files. ConfigManager.init(this); - final ConfigFile config = ConfigManager.getConfigFile(); + // Allow entries to TickTask (just in case). + TickTask.setLocked(false); + // + final ConfigFile config = ConfigManager.getConfigFile(); BlockProperties.applyConfig(config, ConfPaths.COMPATIBILITY_BLOCKS); // Temp probably, // List the events listeners and register.