Using prepopulated values to get choices
@@ -940,9 +940,7 @@ public static CommandElement bool(Text key) {
@Override
protected Iterable<String> getChoices(CommandSource source) {
- return Arrays.stream(this.type.getEnumConstants())
- .map(Enum::name)
- .collect(Collectors.toList());
+ return this.values.keySet();
}
@Override
