Class PermissionEvents
java.lang.Object
net.fabricmc.fabric.api.permission.v1.PermissionEvents
These events used for handling permission resolution within PermissionContext system.
Implemented callbacks for these event should be thread safe, as permission methods can be called from any active thread.
Additionally, the execution should be reasonably fast for non-player and online player cases.
Offline player checks are allowed to be slower.
When implementing a permission handler, only ON_REQUEST needs to be implemented.
To check for permissions, you should use dedicated methods from PermissionContextOwner interface
and it's implementations over invoking this event.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event<PermissionEvents.OnRequest> Event used for handling permission resolution.static final Event<PermissionEvents.PrepareOfflinePlayer> Event for preparing for offline player checks. -
Method Summary
-
Field Details
-
ON_REQUEST
Event used for handling permission resolution.This event is invoked by methods provided by
PermissionContextOwner. -
PREPARE_OFFLINE_PLAYER
Event for preparing for offline player checks.This event is invoked by
PermissionContext.offlinePlayer(UUID, MinecraftServer).
-