Skip to content

Commit

Permalink
List must be mutable. Remove debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 10, 2022
1 parent 721f027 commit bea9f0e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected List<Flag> getFlags() {
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
Expand Down

0 comments on commit bea9f0e

Please sign in to comment.