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)