Lock, purge and cancel TickTask in onEnable.

This commit is contained in:
asofold 2013-01-13 20:44:23 +01:00
parent ede74785d2
commit e5686d694b

View File

@ -339,6 +339,7 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
TickTask.setLocked(true); TickTask.setLocked(true);
TickTask.purge(); TickTask.purge();
TickTask.cancel(); TickTask.cancel();
// (Keep the tick task locked!)
// Stop metrics task. // Stop metrics task.
if (metrics != null){ if (metrics != null){
@ -421,6 +422,9 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
*/ */
// Reset TickTask (just in case). // Reset TickTask (just in case).
TickTask.setLocked(true);
TickTask.purge();
TickTask.cancel();
TickTask.reset(); TickTask.reset();
// Read the configuration files. // Read the configuration files.