Permalink
Browse files

Fixed weather flag

  • Loading branch information...
me4502 committed Aug 10, 2018
1 parent 1123270 commit e31fa306ab9aa1d5844288d850cc82a857b1f1c2
@@ -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

0 comments on commit e31fa30

Please sign in to comment.