Package net.luckperms.api.node.types
Interface PermissionNode
- All Superinterfaces:
Node,ScopedNode<PermissionNode,PermissionNode.Builder>
A sub-type of
Node representing basic permissions.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PermissionNode.Builderbuilder()Creates aPermissionNodebuilder.static @NonNull PermissionNode.BuilderCreates aPermissionNodebuilder.Gets the permission string this node encapsulates.default @NonNull NodeType<PermissionNode>getType()Gets the type of the node.Gets the level of this wildcard.booleanGets 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, resolveShorthandMethods inherited from interface net.luckperms.api.node.ScopedNode
toBuilder
-
Method Details
-
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
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
Creates aPermissionNodebuilder.- Returns:
- the builder
-
builder
Creates aPermissionNodebuilder.- Parameters:
permission- the permission to set- Returns:
- the builder
-