This commit is contained in:
batchprogrammer314
2021-08-21 13:36:10 -05:00
parent d86a42eab6
commit 84f3918c25
20 changed files with 317 additions and 186 deletions

View File

@@ -55,8 +55,10 @@ public abstract class Agent {
}
public void stopAllTasks() {
taskList.stream().filter(t -> !t.isCancelled()).forEach(BukkitRunnable::cancel);
taskList.clear();
if (!taskList.isEmpty()) {
taskList.stream().filter(t -> !t.isCancelled()).forEach(BukkitRunnable::cancel);
taskList.clear();
}
}
public void setDrops(boolean enabled) {