Fix active async tasks not cancelled by CraftScheduler#cancelTasks(Plugin)

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot 2017-08-29 13:19:14 +02:00
parent fee051b1a3
commit 6f9b17e08b

View file

@ -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();