From ee91bce15792ca982f33a05587508b41f0030cbb Mon Sep 17 00:00:00 2001 From: blablubbabc Date: Tue, 29 Aug 2017 13:19:14 +0200 Subject: [PATCH] Fix active async tasks not cancelled by CraftScheduler#cancelTasks(Plugin) --- .../java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index edd7c74def..c5d751e918 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -226,7 +226,7 @@ public class CraftScheduler implements BukkitScheduler { handle(task, 0l); for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) { if (taskPending == task) { - return; + break; } if (taskPending.getTaskId() != -1 && taskPending.getOwner().equals(plugin)) { taskPending.cancel0();