From aaafba1905c44eb715d747e4ca27e0c1237ec114 Mon Sep 17 00:00:00 2001 From: Hailey Loralyn <33793003+Haileykins@users.noreply.github.com> Date: Fri, 27 Apr 2018 04:35:46 -0700 Subject: [PATCH] Ignore Case when looking up arenas by name. This makes commands case insensitive, e.g. /ma join. Note that arenas with the same name but different casing are considered the same arena, and one of them will be ignored during config-file parsing. --- src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java b/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java index 53497f3..e4a3873 100644 --- a/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java +++ b/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java @@ -225,7 +225,7 @@ public class ArenaMasterImpl implements ArenaMaster public Arena getArenaWithName(Collection arenas, String configName) { for (Arena arena : arenas) - if (arena.configName().equals(configName)) + if (arena.configName().equalsIgnoreCase(configName)) return arena; return null; }