@Override public void onDisable() { circuitPersistence.saveCircuits(); circuitManager.shutdownAllCircuits(); circuitPersistence.clearLoadedWorldsList(); String msg = getDescription().getName() + " " + getDescription().getVersion() + " disabled."; log.info(msg); }
private void postStartup() { if (!circuitPersistence.loadOldFile()) { for (World w : getServer().getWorlds()) { if (!circuitPersistence.isWorldLoaded(w)) circuitPersistence.loadCircuits(w); } } circuitPersistence.loadChannels(); log(Level.INFO, "Processing " + circuitManager.getCircuits().size() + " active chip(s)."); Runnable updater = new Runnable() { @Override public void run() { String ver; try { ver = checkUpdate(); } catch (IOException ex) { log( Level.WARNING, "Couldn't check for an update (" + ex.getClass().getSimpleName() + ")."); return; } if (ver != null) { log( Level.INFO, "A new RedstoneChips version (" + ver + ") is available.\n" + "To download the update go to: http://eisental.github.com/RedstoneChips"); } } }; getServer().getScheduler().scheduleAsyncDelayedTask(this, updater); }