We can't schedule tasks in onDisable()

This commit is contained in:
TfT_02 2013-11-01 17:38:54 +01:00
parent 2e1c585005
commit 6f9a57751e

View File

@ -223,8 +223,6 @@ public class mcMMO extends JavaPlugin {
getLogger().severe(e.toString()); getLogger().severe(e.toString());
} }
} }
new CleanBackupsTask().runTaskAsynchronously(mcMMO.p);
} }
debug("Was disabled."); // How informative! debug("Was disabled."); // How informative!
@ -402,6 +400,9 @@ public class mcMMO extends JavaPlugin {
long saveIntervalTicks = Config.getInstance().getSaveInterval() * 1200; long saveIntervalTicks = Config.getInstance().getSaveInterval() * 1200;
new SaveTimerTask().runTaskTimer(this, saveIntervalTicks, saveIntervalTicks); new SaveTimerTask().runTaskTimer(this, saveIntervalTicks, saveIntervalTicks);
// Cleanup the backups folder
new CleanBackupsTask().runTaskAsynchronously(mcMMO.p);
// Bleed timer (Runs every two seconds) // Bleed timer (Runs every two seconds)
new BleedTimerTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR); new BleedTimerTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR);