diff --git a/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java b/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java index 28b63ebe4..9657aba49 100644 --- a/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java +++ b/src/main/java/world/bentobox/bentobox/panels/settings/SettingsTab.java @@ -4,6 +4,7 @@ import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -77,7 +78,7 @@ public class SettingsTab implements Tab, ClickHandler { List flags = plugin.getFlagsManager().getFlags().stream().filter(f -> f.getType().equals(type)) // We're stripping colors to avoid weird sorting issues .sorted(Comparator.comparing(flag -> ChatColor.stripColor(user.getTranslation(flag.getNameReference())))) - .toList(); + .collect(Collectors.toList()); // Remove any that are not for this game mode plugin.getIWM().getAddon(world).ifPresent(gm -> flags.removeIf(f -> !f.getGameModes().isEmpty() && !f.getGameModes().contains(gm))); // Remove any that are the wrong rank or that will be on the top row