Annotation Interface Argument


@Retention(RUNTIME) @Target(PARAMETER) public @interface Argument
Marks a parameter of a CommandMethod method as the argument with this name in the command, e.g. <player>. Parameters of type String, int, long, short, float, double, boolean, UUID and ServerType are converted automatically, other types with an ObjectParser.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    @NonNull String
    Name of the argument in the command, without the angle brackets.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    only possible for the last argument in a command.
    @NonNull String
    Name of the Suggestion that completes this argument in the console.
  • Element Details

    • value

      @NonNull @NonNull String value
      Name of the argument in the command, without the angle brackets.
    • suggestions

      @NonNull @NonNull String suggestions
      Name of the Suggestion that completes this argument in the console.
      Default:
      ""
    • greedy

      boolean greedy
      only possible for the last argument in a command.
      greedy arguments will take all strings after that argument as its argument.
      Default:
      false