public interface ContextUpdateEvent extends LuckPermsEvent
There are no guarantees that this event will be called for every update. It is merely to be used as a "hint" for plugins which depend on the current active contexts for a player.
It will always be fired following a call to
ContextManager.signalContextUpdate(Object).
The subject is always an instance of the platform's subject type. See
ContextManager for details.
Unlike most other LuckPerms events, this event is not fired asynchronously. Care should be taken to ensure listeners are lightweight. Additionally, listeners should ensure they do not cause further updates to player context, thus possibly causing a stack overflow.
| Modifier and Type | Method and Description |
|---|---|
@NonNull Object |
getSubject()
Gets the subject whose contexts were updated.
|
default <T> @NonNull Optional<T> |
getSubject(@NonNull Class<T> subjectClass)
Gets the subject whose contexts were updated, casted to a given type.
|
getEventType, getLuckPerms@NonNull Object getSubject()