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

This commit is contained in:
blablubbabc 2017-08-29 13:19:14 +02:00 committed by md_5
parent 94b0980852
commit ee91bce157

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