Don't show internal flags in flag list

This commit is contained in:
Alexander Söderberg 2020-02-18 20:55:36 +01:00
parent 34291d5b4d
commit 0b8c3b75aa
2 changed files with 4 additions and 1 deletions

View File

@ -343,6 +343,9 @@ import java.util.concurrent.CompletableFuture;
final Map<String, ArrayList<String>> flags = new HashMap<>(); final Map<String, ArrayList<String>> flags = new HashMap<>();
for (PlotFlag<?, ?> plotFlag : GlobalFlagContainer.getInstance().getRecognizedPlotFlags()) { for (PlotFlag<?, ?> plotFlag : GlobalFlagContainer.getInstance().getRecognizedPlotFlags()) {
if (plotFlag instanceof InternalFlag) {
continue;
}
final String category = plotFlag.getFlagCategory().getTranslated(); final String category = plotFlag.getFlagCategory().getTranslated();
final Collection<String> flagList = final Collection<String> flagList =
flags.computeIfAbsent(category, k -> new ArrayList<>()); flags.computeIfAbsent(category, k -> new ArrayList<>());

View File

@ -55,7 +55,7 @@ public class DenyTeleportFlag extends PlotFlag<DenyTeleportFlag.DeniedGroup, Den
final DeniedGroup group = DeniedGroup.fromString(input); final DeniedGroup group = DeniedGroup.fromString(input);
if (group == null) { if (group == null) {
throw new FlagParseException(this, input, Captions.FLAG_ERROR_ENUM, throw new FlagParseException(this, input, Captions.FLAG_ERROR_ENUM,
"members, nonmembers," + " trusted, nontrusted, nonowners"); "members, nonmembers, trusted, nontrusted, nonowners");
} }
return flagOf(group); return flagOf(group);
} }