/** * @param listeners Reload Listeners as well? * @param silent If silent is true, no notice of the reload will appear in the console. */ public void reload(boolean listeners, boolean silent) { if (listeners) Assigner.unregisterAll(); this.reloadConfig(); config = this.getConfigx(); load(); TRThread.reload(); // Stop TMetrics if the user disabled it in the config and reloaded. if (!config.getBoolean(ConfigFile.General, "UseTMetrics", true)) { tmetrics.stop(); } if (listeners) { Assigner.assign(); if (linkEEPatch()) Assigner.assignEEPatch(); } if (!silent) log.info("TekkitRestrict Reloaded!"); }
@Override public void onDisable() { disable = true; tmetrics.stop(); ttt.disableItemThread.interrupt(); ttt.entityRemoveThread.interrupt(); ttt.gemArmorThread.interrupt(); ttt.worldScrubThread.interrupt(); ttt.saveThread.interrupt(); // ttt.limitFlyThread.interrupt(); try { Thread.sleep(1500); } catch (InterruptedException e) { } // Sleep for 1.5 seconds to allow the savethread to save. TRLogger.saveLogs(); TRLogFilter.disable(); Log.deinit(); FileLog.closeAll(); log.info("TekkitRestrict v " + version.fullVer + " disabled!"); }