geforkt von Mirrors/Paper
Add BukkitTask#isCancelled
Dieser Commit ist enthalten in:
Ursprung
8bf06d6cbf
Commit
bde2a93cfe
@ -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);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren