diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index 4125bb7..bcf15da 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -250,7 +250,9 @@ public abstract class SWCommand { .anyMatch(s -> s.toLowerCase().startsWith(args[args.length - 1].toLowerCase())); if (hasTabCompletes) { try { - message.sendPrefixless(subCommand.description, p); + for (String s : subCommand.description) { + message.sendPrefixless(s, p); + } } catch (Exception e) { Bukkit.getLogger().log(Level.WARNING, "Failed to send description of registered method '" + subCommand.method + "' with description '" + subCommand.description + "'", e); } @@ -263,7 +265,9 @@ public abstract class SWCommand { commandList.forEach(subCommand -> { if (subCommand.guardChecker == null || subCommand.guardChecker.guard(p, GuardCheckType.TAB_COMPLETE, new String[0], null) == GuardResult.ALLOWED) { try { - message.sendPrefixless(subCommand.description, p); + for (String s : subCommand.description) { + message.sendPrefixless(s, p); + } } catch (Exception e) { Bukkit.getLogger().log(Level.WARNING, "Failed to send description of registered method '" + subCommand.method + "' with description '" + subCommand.description + "'", e); } @@ -280,7 +284,7 @@ public abstract class SWCommand { boolean help() default false; - String description() default ""; + String[] description() default {}; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) diff --git a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java index 4581c8d..05cba2d 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SubCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SubCommand.java @@ -36,7 +36,7 @@ class SubCommand { private SWCommand swCommand; Method method; - String description; + String[] description; String[] subCommand; TypeMapper[] arguments; GuardChecker[] guards; @@ -46,7 +46,7 @@ class SubCommand { Class varArgType = null; private boolean help; - SubCommand(SWCommand swCommand, Method method, String[] subCommand, Map> localTypeMapper, Map localGuardChecker, boolean help, String description) { + SubCommand(SWCommand swCommand, Method method, String[] subCommand, Map> localTypeMapper, Map localGuardChecker, boolean help, String[] description) { this.swCommand = swCommand; this.method = method; this.help = help;