From d8dba47c0fd6b9c289f092d55920cef50a213516 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Sat, 4 Aug 2018 11:00:57 +1000 Subject: [PATCH] Fixed bugs in the gamemode marshaller. --- .../sk89q/worldguard/protection/flags/GameModeTypeFlag.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/worldguard-core/src/main/java/com/sk89q/worldguard/protection/flags/GameModeTypeFlag.java b/worldguard-core/src/main/java/com/sk89q/worldguard/protection/flags/GameModeTypeFlag.java index 67122de5..18340349 100644 --- a/worldguard-core/src/main/java/com/sk89q/worldguard/protection/flags/GameModeTypeFlag.java +++ b/worldguard-core/src/main/java/com/sk89q/worldguard/protection/flags/GameModeTypeFlag.java @@ -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