Package net.luckperms.api.node.types
Interface PermissionNode
-
- All Superinterfaces:
Node,ScopedNode<PermissionNode,PermissionNode.Builder>
public interface PermissionNode extends ScopedNode<PermissionNode,PermissionNode.Builder>
A sub-type ofNoderepresenting basic permissions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfacePermissionNode.BuilderAPermissionNodebuilder.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static @NonNull PermissionNode.Builderbuilder()Creates aPermissionNodebuilder.static @NonNull PermissionNode.Builderbuilder(@NonNull String permission)Creates aPermissionNodebuilder.@NonNull StringgetPermission()Gets the permission string this node encapsulates.default @NonNull NodeType<PermissionNode>getType()Gets the type of the node.@NonNull OptionalIntgetWildcardLevel()Gets the level of this wildcard.booleanisWildcard()Gets if this node is a wildcard permission.-
Methods inherited from interface net.luckperms.api.node.Node
equals, equals, getContexts, getExpiry, getExpiryDuration, getKey, getMetadata, getValue, hasExpired, hasExpiry, isNegated, metadata, resolveShorthand
-
Methods inherited from interface net.luckperms.api.node.ScopedNode
toBuilder
-
-
-
-
Method Detail
-
getType
default @NonNull NodeType<PermissionNode> getType()
Description copied from interface:NodeGets the type of the node.- Specified by:
getTypein interfaceNode- Specified by:
getTypein interfaceScopedNode<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 aPermissionNodebuilder.- Returns:
- the builder
-
builder
static @NonNull PermissionNode.Builder builder(@NonNull String permission)
Creates aPermissionNodebuilder.- Parameters:
permission- the permission to set- Returns:
- the builder
-
-