13
0
geforkt von Mirrors/Paper

Fix isCurrentlyRunning for sync tasks

Not sure where this would of ever been used, but for correctness sake.
Dieser Commit ist enthalten in:
Aikar 2018-03-17 13:14:44 -04:00
Ursprung 7241626ffd
Commit 700c900cc3

Datei anzeigen

@ -204,7 +204,7 @@ index 000000000..cf5aada2f
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index e47f4cca2..4a4159879 100644
index e47f4cca2..c3cb9e6d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -0,0 +0,0 @@ import java.util.concurrent.atomic.AtomicReference;
@ -311,8 +311,10 @@ index e47f4cca2..4a4159879 100644
public boolean isCurrentlyRunning(final int taskId) {
+ // Paper start
+ if (!isAsyncScheduler) { //noinspection TailRecursion
+ return this.asyncScheduler.isCurrentlyRunning(taskId);
+ if (!isAsyncScheduler) {
+ if (this.asyncScheduler.isCurrentlyRunning(taskId)) {
+ return true;
+ }
+ }
+ // Paper end
final CraftTask task = runners.get(taskId);