diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 0fff614..8b4f663 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -189,5 +189,4 @@ public abstract class SWCommand { protected @interface LocalMapper { String value(); } - } diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index dac72ea..981b5ca 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -127,17 +127,7 @@ public class SWCommandUtils { } public static TypeMapper createMapper(Function mapper, Function> tabCompleter) { - return new TypeMapper() { - @Override - public T map(String s) { - return mapper.apply(s); - } - - @Override - public List tabCompletes(CommandSender commandSender, String s) { - return tabCompleter.apply(s); - } - }; + return createMapper(mapper, (commandSender, s) -> tabCompleter.apply(s)); } public static TypeMapper createMapper(Function mapper, BiFunction> tabCompleter) { @@ -169,5 +159,4 @@ public class SWCommandUtils { if (method.getAnnotations().length != 1) return null; return method.getAnnotation(annotation); } - } diff --git a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java index b1bb15c..e0088ec 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java @@ -134,5 +134,4 @@ class SubCommand { } return Collections.emptyList(); } - }