Annotation Interface Command


@Target({TYPE,METHOD}) @Retention(CLASS) public @interface Command
Defines a command or subcommand.

On a class: marks it as the main command entry point. On a method or nested class: marks it as a subcommand.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Command or subcommand name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Alternative names for this command.
    Command description.
  • Element Details

    • value

      String value
      Command or subcommand name.
    • aliases

      String[] aliases
      Alternative names for this command.
      Default:
      {}
    • description

      String description
      Command description. Prefix with i18n: for runtime i18n lookup. e.g. "Static text" or "i18n:commands.cmd.desc".
      Default:
      ""