Annotation Interface Permission


@Target({TYPE,METHOD,PARAMETER}) @Retention(RUNTIME) public @interface Permission
Annotation to specify permission requirements for commands or arguments.
  • Element Details

    • value

      String value
      The required permission string.
      Returns:
      the permission string
      Default:
      ""
    • when

      String when
      The condition when the permission is required.
      Returns:
      the condition string
      Default:
      ""
    • condition

      Structured condition type when the permission is required.
      Returns:
      condition type
      Default:
      ALWAYS
    • node

      String node
      Override for generated permission node segment (defaults to argument name).
      Returns:
      custom node segment
      Default:
      ""
    • includeArgumentSegment

      boolean includeArgumentSegment
      Whether to include ".argument." segment before the node (defaults to true).
      Returns:
      true to include ".argument."
      Default:
      true
    • conditionArgs

      String[] conditionArgs
      Names of arguments that participate in the condition.
      Returns:
      argument names
      Default:
      {}
    • compare

      CompareMode compare
      How to compare values (name/UUID/equals/auto).
      Returns:
      compare mode
      Default:
      AUTO
    • message

      String message
      The message to display if permission is denied.
      Returns:
      the permission denied message
      Default:
      "magicutils.noPermission"
    • defaultValue

      Default permission state (string name mirroring Bukkit PermissionDefault).
      Returns:
      default permission
      Default:
      OP