From 438f251b005e378ced29a3f6783caf06e238ddf1 Mon Sep 17 00:00:00 2001 From: magnusulf Date: Tue, 25 Nov 2014 16:31:59 +0100 Subject: [PATCH] Support for gamemode numbers Adding the gamemodes numbers as a way to gather the gamemode. --- .../com/massivecraft/massivecore/cmd/arg/ARGameMode.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/massivecraft/massivecore/cmd/arg/ARGameMode.java b/src/main/java/com/massivecraft/massivecore/cmd/arg/ARGameMode.java index 0355d4ae..e1084ee8 100644 --- a/src/main/java/com/massivecraft/massivecore/cmd/arg/ARGameMode.java +++ b/src/main/java/com/massivecraft/massivecore/cmd/arg/ARGameMode.java @@ -33,15 +33,15 @@ public class ARGameMode extends ARAbstractSelect arg = arg.toLowerCase(); - if (arg.startsWith("s")) + if (arg.startsWith("s") || arg.equals("0")) { ret = GameMode.SURVIVAL; } - else if (arg.startsWith("c")) + else if (arg.startsWith("c") || arg.equals("1")) { ret = GameMode.CREATIVE; } - else if (arg.startsWith("a")) + else if (arg.startsWith("a") || arg.equals("2")) { ret = GameMode.ADVENTURE; }