Interface IPermissionHandler
- All Known Implementing Classes:
- DefaultPermissionHandler
public interface IPermissionHandler
This is the Heart of the PermissionAPI, it manages 
PermissionNodes
 as well as it handles all permission queries.
 Note: You do not need to implement a PermissionHandler to query for permissions.
- API Note:
- You can implement your own PermissionHandler using the PermissionGatherEvent.Handlerevent.
- Implementation Note:
- The DefaultPermissionHandlerdoes forward all permission queries to the PermissionNodes default resolver.
- 
Method SummaryModifier and TypeMethodDescriptionReturns an identifier for the PermissionHandler.<T> TgetOfflinePermission(UUID player, PermissionNode<T> node, PermissionDynamicContext<?>... context) <T> TgetPermission(ServerPlayer player, PermissionNode<T> node, PermissionDynamicContext<?>... context) Set<PermissionNode<?>>Returns an unmodifiable view of the collection of registered permission nodes.
- 
Method Details- 
getIdentifierResourceLocation getIdentifier()Returns an identifier for the PermissionHandler.- Returns:
- an identifier for the PermissionHandler
 
- 
getRegisteredNodesSet<PermissionNode<?>> getRegisteredNodes()Returns an unmodifiable view of the collection of registered permission nodes.- Returns:
- an unmodifiable view of the collection of registered permission nodes
 
- 
getPermission<T> T getPermission(ServerPlayer player, PermissionNode<T> node, PermissionDynamicContext<?>... context) Mods must usePermissionAPI.getPermission(ServerPlayer, PermissionNode, PermissionDynamicContext[])Queries a player's permission for a given node and contexts Warning: PermissionNodes must be registered using the PermissionGatherEvent.Nodesevent before querying.- Type Parameters:
- T- type of the queried PermissionNode
- Parameters:
- player- player for which you want to check permissions
- node- the PermissionNode for which you want to query
- context- optional array of PermissionDynamicContext, single entries will be ignored if they weren't registered to the node
- Returns:
- a value of type <T>, that the combination of Player and PermissionNode map to.
 
- 
getOfflinePermission<T> T getOfflinePermission(UUID player, PermissionNode<T> node, PermissionDynamicContext<?>... context) - Type Parameters:
- T- type of the queried PermissionNode
- Parameters:
- player- offline player for which you want to check permissions
- node- the PermissionNode for which you want to query
- context- optional array of PermissionDynamicContext, single entries will be ignored if they weren't registered to the node
- Returns:
- a value of type <T>, that the combination of Player and PermissionNode map to.
 
 
-