From 1a44aab54a30596282a6f84d01bb4bd767adbf5e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 28 Jul 2022 08:54:27 +0200 Subject: [PATCH] Add some JavaDoc to AbstractSWCommand --- .../steamwar/command/AbstractSWCommand.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/de/steamwar/command/AbstractSWCommand.java b/src/de/steamwar/command/AbstractSWCommand.java index 1de5785..ab30ae3 100644 --- a/src/de/steamwar/command/AbstractSWCommand.java +++ b/src/de/steamwar/command/AbstractSWCommand.java @@ -54,8 +54,14 @@ public abstract class AbstractSWCommand { protected abstract void createAndSafeCommand(String command, String[] aliases); + /** + * This method should unregister the given command. + */ public abstract void unregister(); + /** + * This method should register the given command. + */ public abstract void register(); protected void commandSystemError(T sender, CommandFrameworkException e) { @@ -284,16 +290,31 @@ public abstract class AbstractSWCommand { return methods; } + /** + * Register a given method as a command entry point. + */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) @Repeatable(Register.Registeres.class) protected @interface Register { + /** + * The sub command on which this command entry point should be registered. + */ String[] value() default {}; + /** + * {@code true} if this is a help command entry. + */ boolean help() default false; + /** + * The description messages for this command entry. + */ String[] description() default {}; + /** + * {@code true} if this command entry should not be tab completed. + */ boolean noTabComplete() default false; @Retention(RetentionPolicy.RUNTIME)