EnumValueElement#getValue case fix
Remove EnumValueElement choices null check
@@ -929,14 +929,14 @@ public static CommandElement bool(Text key) {
@Override
protected Iterable<String> getChoices(CommandSource source) {
- return Arrays.asList(this.type.getEnumConstants()).stream()
- .map(input -> input == null ? null : input.name())
+ return Arrays.stream(this.type.getEnumConstants())
+ .map(Enum::name)
.collect(Collectors.toList());
}
@Override
protected Object getValue(String choice) throws IllegalArgumentException {
- return Enum.valueOf(this.type, choice.toUpperCase());
+ return Enum.valueOf(this.type, choice);
}
}
