List must be mutable. Remove debug.

This commit is contained in:
tastybento 2022-01-09 20:41:20 -08:00
parent 721f0271aa
commit bea9f0e394
2 changed files with 1 additions and 2 deletions

View File

@ -247,7 +247,6 @@ public class AdminSettingsCommand extends CompositeCommand {
String disabled = ChatColor.stripColor(user.getTranslation("protection.panel.flag-item.setting-disabled"));
List<String> options = new ArrayList<>();
String lastArg = !args.isEmpty() ? args.get(args.size()-1) : "";
System.out.println("Arg size = " + args.size());
if (args.size() == 2) {
// Player names or world settings
options = Util.tabLimit(Util.getOnlinePlayerList(user), lastArg);

View File

@ -78,7 +78,7 @@ public class SettingsTab implements Tab, ClickHandler {
List<Flag> 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