Interface PermissionNode

All Superinterfaces:
Node, ScopedNode<PermissionNode,PermissionNode.Builder>

public interface PermissionNode extends ScopedNode<PermissionNode,PermissionNode.Builder>
A sub-type of Node representing basic permissions.
  • Method Details

    • getType

      default @NonNull NodeType<PermissionNode> getType()
      Description copied from interface: Node
      Gets the type of the node.
      Specified by:
      getType in interface Node
      Specified by:
      getType in interface ScopedNode<PermissionNode,PermissionNode.Builder>
      Returns:
      the node type
    • getPermission

      @NonNull String getPermission()
      Gets the permission string this node encapsulates.

      The exact value of this string may vary for nodes which aren't regular permission settings.

      Returns:
      the actual permission node
    • isWildcard

      boolean isWildcard()
      Gets if this node is a wildcard permission.
      Returns:
      true if this node is a wildcard permission
    • getWildcardLevel

      @NonNull OptionalInt getWildcardLevel()
      Gets the level of this wildcard.

      The node luckperms.* has a wildcard level of 1.

      The node luckperms.user.permission.* has a wildcard level of 3.

      Nodes with a higher wildcard level are more specific and have priority over less specific nodes (nodes with a lower wildcard level).

      Returns:
      the wildcard level
    • builder

      static @NonNull PermissionNode.Builder builder()
      Creates a PermissionNode builder.
      Returns:
      the builder
    • builder

      static @NonNull PermissionNode.Builder builder(@NonNull String permission)
      Creates a PermissionNode builder.
      Parameters:
      permission - the permission to set
      Returns:
      the builder