Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,14 @@ public Collection<Command> tab(
.filter(value -> value.startsWith(args[0].toLowerCase(Locale.ENGLISH)))
.map(value -> new Command(null, false, value, "", RequiredType.NONE, null) {
}).collect(Collectors.toList());
} else if (Arrays.asList("set", "add", "remove", "delete", "info")
} else if (Arrays.asList("set", "s", "add", "a", "remove", "r", "delete", "info", "i")
Copy link
Copy Markdown
Member

@dordsor21 dordsor21 Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'd like to see these extracted to static final Collections.immutableSet at the class level - this would be best practices for Java. The args.length == # should be moved -- it is unlikely for these operations to be reordered

.contains(args[0].toLowerCase(Locale.ENGLISH)) && args.length == 2) {
return GlobalFlagContainer.getInstance().getRecognizedPlotFlags().stream()
.filter(flag -> !(flag instanceof InternalFlag))
.filter(flag -> flag.getName().startsWith(args[1].toLowerCase(Locale.ENGLISH)))
.map(flag -> new Command(null, false, flag.getName(), "", RequiredType.NONE, null) {
}).collect(Collectors.toList());
} else if (Arrays.asList("set", "add", "remove", "delete")
} else if (Arrays.asList("set", "s", "add", "a", "remove", "r", "delete")
.contains(args[0].toLowerCase(Locale.ENGLISH)) && args.length == 3) {
try {
final PlotFlag<?, ?> flag =
Expand Down Expand Up @@ -314,7 +314,7 @@ public Collection<Command> tab(
} catch (final Exception ignored) {
}
}
return tabOf(player, args, space);
return Collections.emptyList();
}

@CommandDeclaration(command = "set",
Expand Down
Loading