Skip to content

Events (infrastructure)

Subscribing, firing, priorities, the event struct contract and the cause/reason enums events carry.

Type Kind Description
DamageCause enum Why an entity took damage (derived from the vanilla damage type).
EventBus class Owner-less event firing helpers.
EventHeader struct First field of every event struct (McEventHeader).
EventListener<T> delegate Event handler; gets the event by reference (mutable fields and Cancelled are writable).
EventPriority enum Lower runs first.
EventRegistry class Event subscription and firing, scoped to a plugin (everything is released on unload).
EventType<T> class Resolved runtime id per event type.
GameModeChangeCause enum Why a game mode changed.
IEvent interface An event type.
IgniteCause enum What set a block on fire.
InteractAction enum What a player clicked.
LoginDeferral class A login held by a plugin (see PlayerPreLoginEvent.Defer).
PlayerAction enum Values of the protocol enum PlayerAction (the wire carries the ordinal).
PortalCreateReason enum Why a portal is being created.
RespawnReason enum Why a player is respawning.
SpawnReason enum Why an entity is being added to the world.
Subscription class An active event subscription.
TeleportCause enum Why a player is being teleported.
TimeSkipReason enum Why the day time jumped.