refactor: Reorder gamerules completion alphabetically

This commit is contained in:
Ben Woo 2023-02-15 11:24:56 +08:00
parent 9a255555a6
commit 53f453b7ac

View File

@ -55,6 +55,10 @@ public class MVCommandCompletions extends PaperCommandCompletions {
context.getConfig("groupName", ""), context.getContextValue(String[].class));
}
private Collection<String> suggestGamerules() {
return Arrays.stream(GameRule.values()).map(GameRule::getName).collect(Collectors.toList());
}
private Collection<String> suggestMVWorlds(BukkitCommandCompletionContext context) {
if (context.hasConfig("playerOnly") && !context.getIssuer().isPlayer()) {
return Collections.emptyList();
@ -92,8 +96,4 @@ public class MVCommandCompletions extends PaperCommandCompletions {
}
return worlds;
}
private Collection<String> suggestGamerules() {
return Arrays.stream(GameRule.values()).map(GameRule::getName).collect(Collectors.toList());
}
}