mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-28 19:03:51 -07:00
@@ -28,10 +28,6 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return getPeriod() == -2l;
|
||||
}
|
||||
|
||||
public boolean isDone() {
|
||||
final long period = this.getPeriod();
|
||||
return period != -1l && period != -3l;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user