Package dev.polv.taleapi.permission
Class PermissionNode.Builder
java.lang.Object
dev.polv.taleapi.permission.PermissionNode.Builder
- Enclosing class:
- PermissionNode
Builder for creating PermissionNode instances.
-
Method Summary
Modifier and TypeMethodDescriptionallow()Sets the state to ALLOW.build()Builds the immutable PermissionNode.context(ContextSet context) Sets the context for this permission.deny()Sets the state to DENY.Sets the payload value.Sets the permission state.
-
Method Details
-
state
Sets the permission state.- Parameters:
state- the tristate- Returns:
- this builder
-
allow
Sets the state to ALLOW.- Returns:
- this builder
-
deny
Sets the state to DENY.- Returns:
- this builder
-
payload
Sets the payload value.- Parameters:
payload- the dynamic value- Returns:
- this builder
-
context
Sets the context for this permission.- Parameters:
context- the context set- Returns:
- this builder
-
build
Builds the immutable PermissionNode.- Returns:
- a new PermissionNode
-