Interface PermissionGrant
- All Superinterfaces:
AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptiondefault PermissionGrantGrants a node.default voidclose()default PermissionGrantRefuses a node, overriding any broader grant.holder()owner()voidrevoke()Removes every override of this grant from the holder.booleanrevoked()set(PermissionNode node, TriState state) Sets the state of a node.default PermissionGrantDrops an override, letting resolution fall through to the next source.
-
Method Details
-
owner
Plugin owner()- Returns:
- the plugin this grant belongs to
-
holder
PermissionHolder holder()- Returns:
- the holder this grant applies to
-
set
Sets the state of a node.- Parameters:
node- the nodestate- the state;TriState.NOT_SETremoves the override- Returns:
- this grant, for chaining
- Throws:
IllegalStateException- if the grant has been revoked
-
allow
Grants a node.- Parameters:
node- node path- Returns:
- this grant, for chaining
-
deny
Refuses a node, overriding any broader grant.- Parameters:
node- node path- Returns:
- this grant, for chaining
-
unset
Drops an override, letting resolution fall through to the next source.- Parameters:
node- node path- Returns:
- this grant, for chaining
-
overrides
Map<PermissionNode, TriState> overrides()- Returns:
- an immutable snapshot of the overrides carried by this grant
-
revoked
boolean revoked()- Returns:
trueoncerevoke()has been called
-
revoke
void revoke()Removes every override of this grant from the holder. Calling it more than once is a no-op. -
close
default void close()- Specified by:
closein interfaceAutoCloseable
-