diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java index 1baec564c0..191a1c13e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java @@ -28,10 +28,6 @@ class CraftFuture extends CraftTask implements Future { return true; } - public boolean isCancelled() { - return getPeriod() == -2l; - } - public boolean isDone() { final long period = this.getPeriod(); return period != -1l && period != -3l; diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java index 55db3ff868..9cb666bb1e 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -81,6 +81,11 @@ class CraftTask implements BukkitTask, Runnable { return task.getClass(); } + @Override + public boolean isCancelled() { + return (period == -2l); + } + public void cancel() { Bukkit.getScheduler().cancelTask(id); }