From b60531da2463452ad923e1451031b016009e9fce Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 23 Sep 2019 11:36:06 -0400 Subject: [PATCH] Removed 1.11.2- incompatible method. --- Core/src/main/java/com/songoda/core/SongodaCore.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Core/src/main/java/com/songoda/core/SongodaCore.java b/Core/src/main/java/com/songoda/core/SongodaCore.java index 911a5678..a8fbcee2 100644 --- a/Core/src/main/java/com/songoda/core/SongodaCore.java +++ b/Core/src/main/java/com/songoda/core/SongodaCore.java @@ -15,12 +15,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.HttpURLConnection; import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; +import java.util.*; import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.entity.Player; @@ -177,7 +172,7 @@ public class SongodaCore { */ private void destroy() { Bukkit.getServicesManager().unregister(SongodaCore.class, INSTANCE); - tasks.stream().filter(task -> task != null && !task.isCancelled()) + tasks.stream().filter(Objects::nonNull) .forEach(task -> Bukkit.getScheduler().cancelTask(task.getTaskId())); HandlerList.unregisterAll(loginListener); if (!hasShading()) {