Event explorer
Filter the catalogue, expand an event to see its fields (purple rows are mutable: a handler may write them and the engine reads the new value back), and copy a handler for it with the priority you pick. The data is generated from src/scripting/events.json on every build; “fired” means the engine has a firing site for the event on the checkout the docs were built from (see the status page).
78 of 78 events
Fired once after the server finished starting, before the first tick.
Fired once when the server begins shutting down.
Fired at the start of every server tick.
Fired at the end of every server tick.
A client finished authentication and is about to enter the configuration phase. Handlers run on the TICK thread: a blocking call (a database or web lookup) freezes the whole server, so do not look anything up here. Cancel to refuse the login (set the kick message first), or call Defer() and answer later from Scheduler.RunAsync: the login waits up to 30 seconds, continues when every deferral allowed it and is refused as soon as one denies. A plugin that unloads releases its pending deferrals (counted as allowed).
A player entity entered the play state. The join message is broadcast after the handlers ran.
A player disconnected (the entity is still alive during dispatch).
A player moved or rotated. Cancel to teleport the player back; 'to', 'yaw' and 'pitch' may be rewritten. Fires for every accepted movement packet: keep handlers cheap.
A player sent a chat message. Cancel to drop it. Changing Message or Rendered sends the line as an unsigned server message instead of the player's signed one. SenderName, ChatType, Decoration and the filter fields restyle the signed line without unsigning it: the signature covers only the typed text.
A player ran a command (without the leading slash). Cancel to suppress it; the command line may be rewritten.
A player right-clicked a block (fired after PlayerInteract). Cancel to stop the block interaction and item use.
A player is about to break a block. Cancel to keep the block (the client is resynced).
A player is about to place a block. Cancel to refuse; 'block_state' may be rewritten.
An entity is about to be added to the world. Cancel to prevent it.
A living entity is about to take damage. Cancel to negate it. 'amount' (the damage after armor and enchantments, before absorption) may be rewritten.
A living entity died.
A decoded-frame packet arrived (payload excludes the packet id). Cancel to drop it.
RESERVED: not fired yet (the per-connection send path encodes shared frames). A packet is about to be sent to one connection.
A chunk became loaded.
A chunk is about to be unloaded.
A client asked for the server list status. Change the MOTD, the player counts or hide the player sample.
The command tree changed (a plugin registered or removed commands, or a permission changed). Fired once per tick at most, before the trees are resent to the players.
A plugin finished enabling.
A plugin was disabled (unload or hot reload); its registrations are already released.
A permission entry of a player changed (or of a group or everything: AllPlayers is true). Fired after the change; the command trees of the players are resent in the same tick.
The permission backend was reloaded from disk (/perm reload or Permissions.Reload).
A player is about to be kicked by a command or plugin. Cancel to keep the player. Not fired for protocol errors or disconnects.
A player is respawning. The destination may be changed.
A player died. The death message, inventory/experience drops and level keeping can be changed.
A player selected another hotbar slot. Cancel to revert the selection.
A player swapped the main hand and off hand items (F key). Cancel to keep them.
A player drops an item from the hotbar or inventory (drop key). Cancel to keep it.
A player is about to pick up an item entity. Cancel to leave it on the ground.
A player finished eating or drinking. Cancel to prevent the effects and the item consumption.
A player clicked (left or right, air or block). Cancel to stop the default action: block breaking start, block use, item use.
A player right-clicked an entity. Cancel to stop the interaction.
A player started or stopped sneaking. Cancel to ignore the change.
A player started or stopped sprinting. Cancel to ignore the change.
A player started or stopped flying (creative / may-fly). Cancel to ignore the change.
A player's game mode is about to change. Cancel to keep the old one.
A player is about to be teleported (command, plugin, ender pearl, ...). Cancel to stay; the destination may be changed.
A player is about to travel through a portal (nether portal, end portal, end gateway). Cancel to stay.
A player arrived in another dimension.
A client reported the state of a pushed resource pack.
A player's experience level changed.
A creative-mode player put a stack into an inventory slot from the creative menu (slot -1: threw one out of the menu). Cancel to refuse; the client is resynced.
A player started digging a block. Cancel to stop the dig. Set InstaBreak to break it at once.
Fire is about to be placed in the world. Cancel to prevent it.
Fire is about to destroy a block. Cancel to keep it.
A block is spreading to a neighbour (grass, mycelium, vines, fire). Cancel to stop it.
A block is melting, drying or fading (ice, snow, farmland, fire). Cancel to keep it.
A block is forming through the environment (snow, ice, concrete, obsidian ...). Cancel to stop it.
A plant is growing (crops, stems, cactus, sugar cane, ...). Cancel to stop it.
A piston is about to extend. Cancel to keep it retracted.
A piston is about to retract. Cancel to keep it extended.
A redstone component's output power changes. The new power may be changed.
An entity is about to be set on fire. Cancel to prevent it; the duration may be changed.
A player is about to open a container (chest, furnace, crafting table, ...). Cancel to keep it closed.
A player closed a container.
A player clicked a slot of an open container (also the player inventory). Cancel to undo the click (the client is resynced).
A player finished dragging a stack over several slots. Cancel to undo.
A player took the result of a crafting recipe (cancel the InventoryClick event of the result slot to prevent crafting).
The crafting grid matched a recipe. Cancel to show no result.
A furnace, smoker or blast furnace finished smelting an item. Cancel to keep the input unsmelted.
A furnace is about to consume fuel. Cancel to not burn it; the burn time may be changed.
A player is enchanting an item at an enchanting table. Cancel to refuse.
The anvil inputs changed and a result was computed. Cancel to show no result; the cost may be changed.
A player clicked in a custom GUI (Menu) of a plugin, after InventoryClick. Menus are locked: the click is denied (the client is resynced) unless a handler sets Allow, and a cancel always denies it. A click that could move items out of or into the menu (a slot of the menu, shift click, double click, drag, number key, off hand key) is delivered here with the slot of the menu's own numbering (top slots first, then the player's 27 + 9 slots).
A plugin menu was closed for a player (for any reason). The player's cursor stack has already been given back.
A player used a custom item (right click in the air or on a block). Fired by the content layer after PlayerInteract. Cancel to stop the item's own handler and the default action.
A player is placing a custom block with a custom item. Cancel to refuse.
A player is breaking a custom block (fired by the content layer after BlockBreak). Cancel to keep the block.
A player right-clicked a custom block (fired by the content layer after PlayerInteractBlock). Cancel to stop the block handler and the item use.
The day time jumped (sleeping through the night, /time set or /time add).
The rain started or stopped (overworld weather).
A nether portal frame is about to be filled or a destination portal built. Cancel to prevent it.
A player clicked an NPC made with Npcs.Create (a left click is an attack, a right click an interaction). Observed only: the click has no other effect.
A player sent a private message (/msg, /tell, /w) to one player. Cancel to drop the copy for that target. Changing the message sends it unsigned; a changed decoration keeps it signed. Console senders do not fire it.
The same list as plain tables is on the event catalogue page, and the machine-readable form is api.json.