diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 30da3ec..47b6971 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -180,6 +180,7 @@ public abstract class SWCommand { @Target({ElementType.METHOD}) protected @interface Register { String[] value() default {}; + boolean help() default false; } @@ -187,6 +188,7 @@ public abstract class SWCommand { @Target({ElementType.PARAMETER, ElementType.METHOD}) protected @interface Mapper { String value(); + boolean local() default false; } diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java index b97db6d..8cd20fe 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommandUtils.java @@ -60,7 +60,6 @@ public class SWCommandUtils { addMapper(double.class, Double.class, createMapper(Double::parseDouble, numberCompleter(Double::parseDouble))); addMapper(int.class, Integer.class, createMapper(Integer::parseInt, numberCompleter(Integer::parseInt))); MAPPER_FUNCTIONS.put(String.class.getTypeName(), createMapper(s -> s, Collections::singletonList)); - MAPPER_FUNCTIONS.put(StringBuilder.class.getTypeName(), createMapper(StringBuilder::new, Collections::singletonList)); MAPPER_FUNCTIONS.put(Player.class.getTypeName(), createMapper(Bukkit::getPlayer, s -> Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList()))); MAPPER_FUNCTIONS.put(GameMode.class.getTypeName(), createMapper(s -> { s = s.toLowerCase();