suppress logging of border-checking task being "stopped" when the task is being restarted (which is done to make sure there's only one such task running at any time), to reduce potential confusion

This commit is contained in:
Brettflan 2016-07-10 23:03:29 -05:00
parent 9abf6ff938
commit e64defbdeb

View File

@ -453,7 +453,7 @@ public class Config
public static void StartBorderTimer() public static void StartBorderTimer()
{ {
StopBorderTimer(); StopBorderTimer(false);
borderTask = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new BorderCheckTask(), timerTicks, timerTicks); borderTask = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new BorderCheckTask(), timerTicks, timerTicks);
@ -464,11 +464,16 @@ public class Config
} }
public static void StopBorderTimer() public static void StopBorderTimer()
{
StopBorderTimer(true);
}
public static void StopBorderTimer(boolean logIt)
{ {
if (borderTask == -1) return; if (borderTask == -1) return;
plugin.getServer().getScheduler().cancelTask(borderTask); plugin.getServer().getScheduler().cancelTask(borderTask);
borderTask = -1; borderTask = -1;
if (logIt)
logConfig("Border-checking timed task stopped."); logConfig("Border-checking timed task stopped.");
} }