From 9596309dc93442db86ea490c4b05cf1ac0d049d1 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 8 Dec 2021 20:36:36 +0100 Subject: [PATCH] Hotfix SWCommandUtils --- SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index 0635e6b..dbe616a 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -163,11 +163,7 @@ public class SWCommandUtils { GUARD_FUNCTIONS.putIfAbsent(name, guardChecker); } - public static TypeMapper createMapper(String value) { - return createMapper((s) -> value.equals(s) ? value : null, s -> Collections.singletonList(value)); - } - - public static TypeMapper createMapper(String[] values) { + public static TypeMapper createMapper(String... values) { List strings = Arrays.asList(values); return createMapper((s) -> strings.contains(s) ? s : null, s -> strings); }