From d7525bd73c67504f552e206f7ba5c383d8688c87 Mon Sep 17 00:00:00 2001 From: asofold Date: Tue, 4 Sep 2012 06:03:43 +0200 Subject: [PATCH] Fix issue on reloading. --- src/fr/neatmonster/nocheatplus/NoCheatPlus.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fr/neatmonster/nocheatplus/NoCheatPlus.java b/src/fr/neatmonster/nocheatplus/NoCheatPlus.java index b4e2150f..edad7a23 100644 --- a/src/fr/neatmonster/nocheatplus/NoCheatPlus.java +++ b/src/fr/neatmonster/nocheatplus/NoCheatPlus.java @@ -83,6 +83,9 @@ public class NoCheatPlus extends JavaPlugin implements Listener { // Just to be sure nothing gets left out. getServer().getScheduler().cancelTasks(this); + + // Remove listeners. + listeners.clear(); // Tell the server administrator the we finished unloading NoCheatPlus. System.out.println("[NoCheatPlus] Version " + pdfFile.getVersion() + " is disabled."); @@ -104,6 +107,7 @@ public class NoCheatPlus extends JavaPlugin implements Listener { ConfigManager.init(this); // List the events listeners. + listeners.clear(); listeners.add(new BlockBreakListener()); listeners.add(new BlockInteractListener()); listeners.add(new BlockPlaceListener());