Package net.luckperms.api.event.node
Interface NodeMutateEvent
-
- All Superinterfaces:
LuckPermsEvent
- All Known Subinterfaces:
NodeAddEvent,NodeClearEvent,NodeRemoveEvent
public interface NodeMutateEvent extends LuckPermsEvent
Called when a node is added to/removed from a user/group
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull @Unmodifiable Set<Node>getDataAfter()Gets an immutable copy of the holders data after the change@NonNull @Unmodifiable Set<Node>getDataBefore()Gets an immutable copy of the holders data before the change@NonNull DataTypegetDataType()Gets the data type that was mutated.@NonNull PermissionHoldergetTarget()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 aUser-
Methods inherited from interface net.luckperms.api.event.LuckPermsEvent
getEventType, getLuckPerms
-
-
-
-
Method Detail
-
getTarget
@NonNull PermissionHolder getTarget()
Gets the target of the event- Returns:
- the event target
-
getDataType
@NonNull DataType 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
-
-