mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Fixed weather flag
This commit is contained in:
parent
1123270a07
commit
e31fa306ab
@ -38,9 +38,6 @@ protected WeatherTypeFlag(String name) {
|
||||
public WeatherType parseInput(FlagContext context) throws InvalidFlagFormat {
|
||||
String input = context.getUserInput();
|
||||
input = input.trim();
|
||||
if (!input.startsWith("/")) {
|
||||
input = "/" + input;
|
||||
}
|
||||
WeatherType weatherType = unmarshal(input);
|
||||
if (weatherType == null) {
|
||||
throw new InvalidFlagFormat("Unknown game mode: " + input);
|
||||
@ -50,7 +47,7 @@ public WeatherType parseInput(FlagContext context) throws InvalidFlagFormat {
|
||||
|
||||
@Override
|
||||
public WeatherType unmarshal(@Nullable Object o) {
|
||||
return WeatherTypes.get(String.valueOf(o));
|
||||
return WeatherTypes.get(String.valueOf(o).toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user