diff --git a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java index f04cf62..4125bb7 100644 --- a/SpigotCore_Main/src/de/steamwar/command/SWCommand.java +++ b/SpigotCore_Main/src/de/steamwar/command/SWCommand.java @@ -47,6 +47,7 @@ public abstract class SWCommand { @Setter private Message message = null; + private List defaultHelpMessages = new ArrayList<>(); protected SWCommand(String command) { this(command, new String[0]); @@ -205,6 +206,10 @@ public abstract class SWCommand { }); } + public void addDefaultHelpMessage(String message) { + defaultHelpMessages.add(message); + } + private List methods() { List methods = new ArrayList<>(Arrays.asList(getClass().getDeclaredMethods())); methods.addAll(Arrays.asList(SWCommand.class.getDeclaredMethods())); @@ -228,6 +233,7 @@ public abstract class SWCommand { } try { message.sendPrefixless("COMMAND_HELP_HEAD", p, command.getName()); + defaultHelpMessages.forEach(s -> message.sendPrefixless(s, p)); } catch (Exception e) { Bukkit.getLogger().log(Level.WARNING, "Failed to send help message", e); return;