public void shutdownSequence() throws IOException { for (String s : DataBase.getBanned()) { logger.log(s, null, 2); } DataBase.clearAll(); logger = null; npcHandler = null; modifyWorld = null; Plugin.shutDown(); }
public void onEnable() { new Plugin(this); new LogHandler(); loadConfiguration(); try { logger = new PVPLogger(); } catch (IOException e) { e.printStackTrace(); } try { DataBase.loadQueue(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } npcHandler = new NPCManager(this); if (getServer().getPluginManager().getPlugin("Modifyworld") != null) { modifyWorld = getServer().getPluginManager().getPlugin("Modifyworld"); } registerExecutors(); registerListeners(); scheduleRepeatingUpdateCheck(); System.out.println("AntiRelog version [" + getDescription().getVersion() + "] loaded"); }
public void onDisable() { try { DataBase.saveQueue(); } catch (IOException e) { e.printStackTrace(); } try { shutdownSequence(); } catch (IOException e) { e.printStackTrace(); } System.out.println("AntiRelog version [" + getDescription().getVersion() + "] unloaded"); }