Annotation Interface Arg


@Retention(RUNTIME) @Target(PARAMETER) public @interface Arg
Annotation to define a command argument on a method parameter.

Use this locally with Command to automatically register arguments.

Since:
1.0.6
Version:
1.0.6
Author:
HytaleLoader
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the argument.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The description of the argument.
    boolean
    Whether the argument is optional.
  • Element Details

    • name

      String name
      The name of the argument.
      Returns:
      the argument name
    • description

      String description
      The description of the argument.
      Returns:
      the description
      Default:
      "No description"
    • optional

      boolean optional
      Whether the argument is optional. If true, the argument will be registered as optional. Note: Optional arguments must be at the end of the argument list.
      Returns:
      true if optional, false otherwise
      Default:
      false