Package net.luckperms.api.event.node
Interface NodeMutateEvent
- All Superinterfaces:
LuckPermsEvent
- All Known Subinterfaces:
NodeAddEvent,NodeClearEvent,NodeRemoveEvent
Called when a node is added to/removed from a user/group
-
Method Summary
Modifier and TypeMethodDescriptionGets an immutable copy of the holders data after the changeGets an immutable copy of the holders data before the changeGets the data type that was mutated.Gets the target of the eventdefault booleanisGroup()Gets whether the target of this event is aGroupdefault booleanisUser()Gets whether the target of this event is aUserMethods inherited from interface net.luckperms.api.event.LuckPermsEvent
getEventType, getLuckPerms
-
Method Details
-
getTarget
@NonNull PermissionHolder getTarget()Gets the target of the event- Returns:
- the event target
-
getDataType
Gets the data type that was mutated.- Returns:
- the data type
-
getDataBefore
@NonNull @Unmodifiable Set<Node> getDataBefore()Gets an immutable copy of the holders data before the change- Returns:
- the data before the change
-
getDataAfter
@NonNull @Unmodifiable Set<Node> getDataAfter()Gets an immutable copy of the holders data after the change- Returns:
- the data after the change
-
isUser
default boolean isUser()Gets whether the target of this event is aUserThis is equivalent to checking if getTarget() instanceof User
- Returns:
- if the event is targeting a user
-
isGroup
default boolean isGroup()Gets whether the target of this event is aGroupThis is equivalent to checking if getTarget() instanceof Group
- Returns:
- if the event is targeting a group
-