Amélioration de la méthode onDisable (nettoyage des EventHandler et des taches programmées)

This commit is contained in:
Marc Baloup 2015-03-26 16:00:28 -04:00
parent 90f9d6be8d
commit 1cdd516011

View File

@ -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;