Permalink
Browse files

Fixed bugs in the gamemode marshaller.

  • Loading branch information...
me4502 committed Aug 4, 2018
1 parent a6cfe7d commit d8dba47c0fd6b9c289f092d55920cef50a213516
@@ -38,9 +38,6 @@ protected GameModeTypeFlag(String name) {
public GameMode parseInput(FlagContext context) throws InvalidFlagFormat {
String input = context.getUserInput();
input = input.trim();
if (!input.startsWith("/")) {
input = "/" + input;
}
GameMode gamemode = unmarshal(input);
if (gamemode == null) {
throw new InvalidFlagFormat("Unknown game mode: " + input);
@@ -50,7 +47,7 @@ public GameMode parseInput(FlagContext context) throws InvalidFlagFormat {
@Override
public GameMode unmarshal(@Nullable Object o) {
return GameModes.get(String.valueOf(o));
return GameModes.get(String.valueOf(o).toLowerCase());
}
@Override

0 comments on commit d8dba47

Please sign in to comment.