From 1cdd5160110c4305a382671abcb19a9a74b166ac Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Thu, 26 Mar 2015 16:00:28 -0400 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20la=20m=C3=A9thode=20on?= =?UTF-8?q?Disable=20(nettoyage=20des=20EventHandler=20et=20des=20taches?= =?UTF-8?q?=20programm=C3=A9es)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/plugin/pandacraftutils/PandacraftUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java index efa511c..c050b5e 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/PandacraftUtils.java @@ -30,6 +30,7 @@ import net.mc_pandacraft.java.plugin.pandacraftutils.players.OnlinePlayerManager import net.mc_pandacraft.java.plugin.pandacraftutils.players.PlayerDataCleaner; import net.mc_pandacraft.java.util.mysql.DBConnection; +import org.bukkit.event.HandlerList; import org.bukkit.plugin.java.JavaPlugin; public class PandacraftUtils extends JavaPlugin { @@ -156,6 +157,10 @@ public class PandacraftUtils extends JavaPlugin { setServerState(ServerState.STOPPING); + HandlerList.unregisterAll(this); + + getServer().getScheduler().cancelTasks(this); + ConfigManager.getInstance().saveAll(); afkManager = null;