From 6e140ace7dae0e5c0f11fa49b03a885432d7768c Mon Sep 17 00:00:00 2001 From: Allink Date: Tue, 25 Jul 2023 00:26:47 +0100 Subject: [PATCH] Fix /ci tab completion throwing exceptions --- src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java index 512c69ea..5fbab633 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/util/FUtil.java @@ -21,6 +21,7 @@ import java.time.Instant; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.stream.Collectors; import static org.bukkit.Bukkit.getServer; @@ -144,10 +145,11 @@ public class FUtil return (count == 1 ? "" : "s"); } + @SuppressWarnings("java:S6204") public static List getPlayerList() { return getServer().getOnlinePlayers().stream().filter(player -> - !TotalFreedomMod.getPlugin().al.isVanished(player.getUniqueId())).map(HumanEntity::getName).toList(); + !TotalFreedomMod.getPlugin().al.isVanished(player.getUniqueId())).map(HumanEntity::getName).collect(Collectors.toList()); } public static String listToString(List list)