Annotation Interface CmdParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface CmdParam
Command parameter annotation.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String value
      Returns:
      parameter name
    • suggest

      String suggest
      Returns:
      parameter suggestion
      Resolution proceeds in up to four steps, in order (05-06 / D-07):
      1. A value starting with @ (e.g. "@players") resolves through a registered TabCompleter -- either one of the framework's four built-in keys (@players, @worlds, @materials (plus @blocks/@items), @boolean (plus @toggle) -- see TabCompletionManager) or a key a module registered at runtime. An unknown @key refuses the declaring module to load, naming the class, the method and the key -- it does NOT fall through to step 4.
      2. Any other value is treated as a method name. UltiTools-API will search for that method in the same class first.
      3. If the method is not found, it will search in the class which is indecated in CmdSuggest.
      4. If the method is still not found, it will return the string as the suggestion (i18n supported).
      @ is not a legal Java identifier start, so a plain method name can never collide with the @key notation -- every pre-existing suggest() site needs zero change.
      See Also:
      Default:
      ""