mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Move the lowercase unmarshalling entity code.
This commit is contained in:
parent
f19d2ee73d
commit
a6cfe7d0c9
@ -40,7 +40,7 @@ protected EntityTypeFlag(String name) {
|
||||
@Override
|
||||
public EntityType parseInput(FlagContext context) throws InvalidFlagFormat {
|
||||
String input = context.getUserInput();
|
||||
input = input.trim().toLowerCase();
|
||||
input = input.trim();
|
||||
EntityType entityType = unmarshal(input);
|
||||
if (entityType == null) {
|
||||
throw new InvalidFlagFormat("Unknown entity type: " + input);
|
||||
@ -50,7 +50,7 @@ public EntityType parseInput(FlagContext context) throws InvalidFlagFormat {
|
||||
|
||||
@Override
|
||||
public EntityType unmarshal(@Nullable Object o) {
|
||||
return EntityTypes.get(String.valueOf(o));
|
||||
return EntityTypes.get(String.valueOf(o).toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user