From 2676f97cfb0c7e88a8052a2c19f0d13ef46b5751 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 6 Sep 2022 16:45:56 +0200 Subject: [PATCH] Hotfix TypeMappers --- CommonCore | 2 +- src/de/steamwar/bungeecore/commands/TypeMappers.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CommonCore b/CommonCore index 6e6d349..9df9259 160000 --- a/CommonCore +++ b/CommonCore @@ -1 +1 @@ -Subproject commit 6e6d34905ac39bd2ed9548729041febadd42da2f +Subproject commit 9df92595b2f344585bd3e1639cedc761680b7761 diff --git a/src/de/steamwar/bungeecore/commands/TypeMappers.java b/src/de/steamwar/bungeecore/commands/TypeMappers.java index 6310171..f1927e3 100644 --- a/src/de/steamwar/bungeecore/commands/TypeMappers.java +++ b/src/de/steamwar/bungeecore/commands/TypeMappers.java @@ -77,6 +77,7 @@ public class TypeMappers { return new TypeMapper() { @Override public String map(CommandSender commandSender, String[] previousArguments, String s) { + if (previousArguments.length == 0) return null; if (s.equalsIgnoreCase("random")) return "random"; ArenaMode arenaMode = ArenaMode.getByChat(previousArguments[previousArguments.length - 1]); if (arenaMode.getMaps().contains(s)) return s; @@ -85,6 +86,7 @@ public class TypeMappers { @Override public Collection tabCompletes(CommandSender sender, String[] previousArguments, String s) { + if (previousArguments.length == 0) return null; ArenaMode arenaMode = ArenaMode.getByChat(previousArguments[previousArguments.length - 1]); List stringList = new ArrayList<>(arenaMode.getMaps()); stringList.add("random");