Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Lower-case registry arguments in converter
8377a6bdacb4d5e0b0af2d97e097e3d946cf1a0d Co-Authored-By: Octavia Togami <2093023+octylFractal@users.noreply.github.com>
Dieser Commit ist enthalten in:
Ursprung
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))
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren