mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-15 04:41:37 +08:00
parent
a1313a0edd
commit
8377a6bdac
@ -45,6 +45,7 @@
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class RegistryConverter<V extends Keyed> implements ArgumentConverter<V> {
|
||||
@ -98,7 +99,7 @@ public Component describeAcceptableArguments() {
|
||||
|
||||
@Override
|
||||
public ConversionResult<V> convert(String argument, InjectedValueAccess injectedValueAccess) {
|
||||
V result = registry.get(argument);
|
||||
V result = registry.get(argument.toLowerCase(Locale.ROOT));
|
||||
return result == null
|
||||
? FailedConversion.from(new IllegalArgumentException(
|
||||
"Not a valid " + registry.getName() + ": " + argument))
|
||||
|
Loading…
Reference in New Issue
Block a user