Skip to content

Commit

Permalink
Fixed weather flag
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Aug 13, 2018
1 parent 1123270 commit e31fa30
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit e31fa30

Please sign in to comment.