mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Lower-case registry arguments in converter
8377a6bdacb4d5e0b0af2d97e097e3d946cf1a0d Co-Authored-By: Octavia Togami <2093023+octylFractal@users.noreply.github.com>
This commit is contained in:
parent
0d2c4c0825
commit
d2fbd40021
@ -45,6 +45,7 @@ import org.enginehub.piston.inject.Key;
|
||||
|
||||
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 final class RegistryConverter<V extends Keyed> implements ArgumentConvert
|
||||
|
||||
@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