Event catalogue
78 events are in the catalogue (ids 1-511 are stable ABI). Plugins can add their own events with ids from 512 (see Events).
Mutable fields can be changed by handlers and are read back by the code that fired the event; all others are readonly in C#. Engine says whether the engine fires the event in this release; an event marked “not yet” can be subscribed to, but nothing fires it until the gameplay code gets wired up.
Try the event explorer to filter this list.
Server and tick
Section titled “Server and tick”ServerStartEvent
Section titled “ServerStartEvent”Fired once after the server finished starting, before the first tick. mc:server_start · id 1 · not cancellable · engine: fired · type reference
ServerStopEvent
Section titled “ServerStopEvent”Fired once when the server begins shutting down. mc:server_stop · id 2 · not cancellable · engine: fired · type reference
TickStartEvent
Section titled “TickStartEvent”Fired at the start of every server tick. mc:tick_start · id 3 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Tick |
ulong |
no | The tick number. |
TickEndEvent
Section titled “TickEndEvent”Fired at the end of every server tick. mc:tick_end · id 4 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Tick |
ulong |
no | The tick number. |
TickNanos |
long |
no | Wall time spent in this tick. |
ServerListPingEvent
Section titled “ServerListPingEvent”A client asked for the server list status. Change the MOTD, the player counts or hide the player sample. mc:server_list_ping · id 100 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Connection |
ulong |
no | Connection id. |
Address |
Utf8String |
no | Client address. |
ProtocolVersion |
int |
no | Protocol version the client announced. |
Motd |
component |
yes | The message of the day. |
MaxPlayers |
int |
yes | Maximum player count shown. |
OnlinePlayers |
int |
yes | Online player count shown. |
HidePlayers |
bool |
yes | Do not send the player sample. |
CommandsRegisteredEvent
Section titled “CommandsRegisteredEvent”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. mc:commands_registered · id 101 · not cancellable · engine: fired · type reference
PluginEnableEvent
Section titled “PluginEnableEvent”A plugin finished enabling. mc:plugin_enable · id 102 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
PluginId |
Utf8String |
no | The plugin id. |
PluginName |
Utf8String |
no | The plugin name. |
Version |
Utf8String |
no | The plugin version. |
PluginDisableEvent
Section titled “PluginDisableEvent”A plugin was disabled (unload or hot reload); its registrations are already released. mc:plugin_disable · id 103 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
PluginId |
Utf8String |
no | The plugin id. |
PluginName |
Utf8String |
no | The plugin name. |
Version |
Utf8String |
no | The plugin version. |
PermissionChangedEvent
Section titled “PermissionChangedEvent”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. mc:permission_changed · id 104 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
Uuid |
no | The profile whose permissions changed (zero when AllPlayers). |
AllPlayers |
bool |
no | A group, the default group or the whole backend changed. |
PermissionsReloadedEvent
Section titled “PermissionsReloadedEvent”The permission backend was reloaded from disk (/perm reload or Permissions.Reload). mc:permissions_reloaded · id 105 · not cancellable · engine: fired · type reference
PrivateMessageEvent
Section titled “PrivateMessageEvent”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. mc:player_private_message · id 305 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Sender |
player |
no | The player who typed the command. |
Target |
player |
no | The recipient. A /msg with several targets fires once per target. |
Message |
Utf8String |
yes | The typed text. Changing it sends the message unsigned. |
Decoration |
component |
yes | The body as the line shows it (unsigned content). Equal to the typed text means none. Keeps the message signed. |
InventoryOpenEvent
Section titled “InventoryOpenEvent”A player is about to open a container (chest, furnace, crafting table, …). Cancel to keep it closed. mc:inventory_open · id 260 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Kind |
enum:InventoryKind |
no | The container kind. |
HasPos |
bool |
no | Whether the container is a block. |
Pos |
BlockPos |
no | The block position. |
InventoryCloseEvent
Section titled “InventoryCloseEvent”A player closed a container. mc:inventory_close · id 261 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Kind |
enum:InventoryKind |
no | The container kind. |
InventoryClickEvent
Section titled “InventoryClickEvent”A player clicked a slot of an open container (also the player inventory). Cancel to undo the click (the client is resynced). mc:inventory_click · id 262 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Kind |
enum:InventoryKind |
no | The container kind. |
Slot |
int |
no | The clicked slot index of the container (-999 outside the window). |
ClickType |
enum:ClickType |
no | How it was clicked. |
Button |
int |
no | Raw button of the packet. |
Clicked |
item |
no | The item in the clicked slot. |
Cursor |
item |
no | The item on the cursor. |
InventoryDragEvent
Section titled “InventoryDragEvent”A player finished dragging a stack over several slots. Cancel to undo. mc:inventory_drag · id 263 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Kind |
enum:InventoryKind |
no | The container kind. |
DragType |
enum:DragType |
no | The drag mode. |
Slots |
NativeBytes |
no | The dragged slots as packed little-endian int32 values. |
Cursor |
item |
no | The cursor stack being distributed. |
CraftItemEvent
Section titled “CraftItemEvent”A player took the result of a crafting recipe (cancel the InventoryClick event of the result slot to prevent crafting). mc:craft_item · id 264 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Recipe |
Utf8String |
no | Recipe id. |
Result |
item |
no | The crafted item. |
ShiftClick |
bool |
no | Whether it is a quick-craft. |
PrepareCraftEvent
Section titled “PrepareCraftEvent”The crafting grid matched a recipe. Cancel to show no result. mc:prepare_craft · id 265 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Recipe |
Utf8String |
no | Recipe id. |
Result |
item |
no | The result that would be shown. |
FurnaceSmeltEvent
Section titled “FurnaceSmeltEvent”A furnace, smoker or blast furnace finished smelting an item. Cancel to keep the input unsmelted. mc:furnace_smelt · id 266 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The furnace. |
Source |
item |
no | The ingredient. |
Result |
item |
no | The product. |
FurnaceBurnEvent
Section titled “FurnaceBurnEvent”A furnace is about to consume fuel. Cancel to not burn it; the burn time may be changed. mc:furnace_burn · id 267 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The furnace. |
Fuel |
item |
no | The fuel. |
BurnTicks |
int |
yes | Burn time in ticks. |
EnchantItemEvent
Section titled “EnchantItemEvent”A player is enchanting an item at an enchanting table. Cancel to refuse. mc:enchant_item · id 268 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Item |
item |
no | The item being enchanted. |
Option |
int |
no | The chosen option (0-2). |
Cost |
int |
no | Levels charged. |
PrepareAnvilEvent
Section titled “PrepareAnvilEvent”The anvil inputs changed and a result was computed. Cancel to show no result; the cost may be changed. mc:prepare_anvil · id 269 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
First |
item |
no | Left input. |
Second |
item |
no | Right input. |
Result |
item |
no | The computed result. |
RepairCost |
int |
yes | Levels the player pays. |
RenameText |
Utf8String |
no | The text typed in the rename field. |
TimeSkipEvent
Section titled “TimeSkipEvent”The day time jumped (sleeping through the night, /time set or /time add). mc:time_skip · id 300 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Reason |
enum:TimeSkipReason |
no | Why. |
SkipAmount |
long |
no | Ticks the clock advanced. |
WeatherChangeEvent
Section titled “WeatherChangeEvent”The rain started or stopped (overworld weather). mc:weather_change · id 301 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Raining |
bool |
no | Whether it will be raining. |
Thundering |
bool |
no | Whether it will be thundering. |
PortalCreateEvent
Section titled “PortalCreateEvent”A nether portal frame is about to be filled or a destination portal built. Cancel to prevent it. mc:portal_create · id 303 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Reason |
enum:PortalCreateReason |
no | Why. |
BlockCount |
int |
no | Portal blocks created. |
MenuClickEvent
Section titled “MenuClickEvent”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). mc:menu_click · id 270 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Menu |
int |
no | The native id of the menu (what Menu uses to route the click). |
Slot |
int |
no | The clicked slot, -999 outside the window. |
ClickType |
enum:ClickType |
no | How it was clicked. |
Button |
int |
no | Raw button of the packet. |
Clicked |
item |
no | The item in the clicked slot. |
Cursor |
item |
no | The item on the cursor. |
Allow |
bool |
yes | Set by a handler to let the click change items like in a chest (default false: the menu is a display). |
MenuCloseEvent
Section titled “MenuCloseEvent”A plugin menu was closed for a player (for any reason). The player’s cursor stack has already been given back. mc:menu_close · id 271 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Menu |
int |
no | The native id of the menu. |
Reason |
enum:MenuCloseReason |
no | Why it closed. |
CustomItemUseEvent
Section titled “CustomItemUseEvent”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. mc:custom_item_use · id 272 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
CustomId |
Utf8String |
no | The id of the custom item, “myplugin:ruby”. |
Hand |
enum:Hand |
no | The hand. |
Item |
item |
no | The item stack. |
HasBlock |
bool |
no | Whether the click was on a block. |
Pos |
BlockPos |
no | The clicked block (only when has_block). |
Face |
enum:BlockFace |
no | The clicked face (only when has_block). |
CustomBlockPlaceEvent
Section titled “CustomBlockPlaceEvent”A player is placing a custom block with a custom item. Cancel to refuse. mc:custom_block_place · id 273 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
CustomId |
Utf8String |
no | The id of the custom block. |
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | Where it is placed. |
Against |
BlockPos |
no | The block that was clicked. |
Hand |
enum:Hand |
no | The hand. |
CustomBlockBreakEvent
Section titled “CustomBlockBreakEvent”A player is breaking a custom block (fired by the content layer after BlockBreak). Cancel to keep the block. mc:custom_block_break · id 274 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
CustomId |
Utf8String |
no | The id of the custom block. |
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The block. |
DropItems |
bool |
yes | Whether the block’s drops are spawned. |
CustomBlockInteractEvent
Section titled “CustomBlockInteractEvent”A player right-clicked a custom block (fired by the content layer after PlayerInteractBlock). Cancel to stop the block handler and the item use. mc:custom_block_interact · id 275 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
CustomId |
Utf8String |
no | The id of the custom block. |
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The block. |
Face |
enum:BlockFace |
no | The clicked face. |
Hand |
enum:Hand |
no | The hand. |
Item |
item |
no | The item in that hand. |
NpcInteractEvent
Section titled “NpcInteractEvent”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. mc:npc_interact · id 304 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Npc |
ulong |
no | The NPC’s handle. |
Action |
enum:NpcClick |
no | The click. |
Hand |
enum:Hand |
no | The hand (a left click is the main hand). |
Sneaking |
bool |
no | Whether the player was sneaking. |
Player
Section titled “Player”PlayerPreLoginEvent
Section titled “PlayerPreLoginEvent”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). mc:player_pre_login · id 10 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Connection |
ulong |
no | Connection id. |
Uuid |
Uuid |
no | The authenticated profile id. |
Username |
Utf8String |
no | The profile name. |
Address |
Utf8String |
no | Client address. |
KickMessage |
component |
yes | Shown to the client when the login is cancelled (default: a generic message). |
Deferrals |
int |
no | How many plugins hold the login (each Defer() adds one): it continues when all of them allowed it, and any denial refuses it at once. |
PlayerJoinEvent
Section titled “PlayerJoinEvent”A player entity entered the play state. The join message is broadcast after the handlers ran. mc:player_join · id 11 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Uuid |
Uuid |
no | The profile id. |
Username |
Utf8String |
no | The profile name. |
JoinMessage |
component |
yes | The message broadcast to everybody (set to an empty component to suppress it). |
PlayerQuitEvent
Section titled “PlayerQuitEvent”A player disconnected (the entity is still alive during dispatch). mc:player_quit · id 12 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Uuid |
Uuid |
no | The profile id. |
Username |
Utf8String |
no | The profile name. |
Reason |
Utf8String |
no | Why the connection ended: disconnected, kicked, timeout, protocol_error, connection_lost or server_shutdown. |
QuitMessage |
component |
yes | The message broadcast to everybody (set to an empty component to suppress it). |
PlayerMoveEvent
Section titled “PlayerMoveEvent”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. mc:player_move · id 13 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
From |
Vec3d |
no | Position before the move. |
To |
Vec3d |
yes | Position after the move. |
Yaw |
float |
yes | Yaw after the move. |
Pitch |
float |
yes | Pitch after the move. |
OnGround |
bool |
no | Whether the client reports being on the ground. |
PlayerChatEvent
Section titled “PlayerChatEvent”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. mc:player_chat · id 14 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The sender. |
Message |
Utf8String |
yes | What the player typed. Changing it re-renders the line with the default format. |
Rendered |
component |
yes | The complete line shown to everybody (default: |
SenderName |
component |
yes | The sender name as the line shows it (hover, click and insertion included). Changing it keeps the message signed. |
ChatType |
enum:ChatKind |
yes | The chat type of the line: Chat, EmoteCommand or SayCommand. The message kinds need a target and are refused here (Chat is used). |
Decoration |
component |
yes | The body as the line shows it (unsigned content: colours, highlights, glyphs). Equal to the typed text means none. Keeps the message signed. |
FilterKind |
enum:ChatFilterKind |
yes | How the recipients who filter text see the message (vanilla FilterMask). Any other value fully filters the message. |
FilterBits |
Utf8String |
yes | For PartiallyFiltered: one 0 or 1 per UTF-16 unit of the typed text, 1 hides the unit. A different length or character fully filters the message. |
PlayerCommandEvent
Section titled “PlayerCommandEvent”A player ran a command (without the leading slash). Cancel to suppress it; the command line may be rewritten. mc:player_command · id 15 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Command |
Utf8String |
yes | The command line without the slash. |
PlayerInteractBlockEvent
Section titled “PlayerInteractBlockEvent”A player right-clicked a block (fired after PlayerInteract). Cancel to stop the block interaction and item use. mc:player_interact_block · id 16 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Pos |
BlockPos |
no | The clicked block. |
Face |
byte |
no | The clicked face (BlockFace). |
Hand |
byte |
no | The hand (Hand). |
Item |
item |
no | The item in that hand. |
PlayerKickEvent
Section titled “PlayerKickEvent”A player is about to be kicked by a command or plugin. Cancel to keep the player. Not fired for protocol errors or disconnects. mc:player_kick · id 110 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Reason |
component |
yes | The disconnect screen text. |
LeaveMessage |
component |
yes | The message broadcast to everybody (empty = the default quit message). |
PlayerRespawnEvent
Section titled “PlayerRespawnEvent”A player is respawning. The destination may be changed. mc:player_respawn · id 111 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Reason |
enum:RespawnReason |
no | Why. |
Position |
Vec3d |
yes | Where the player appears. |
World |
world |
yes | The dimension the player appears in. |
IsSpawnPoint |
bool |
no | True when a bed or respawn anchor of the player is used, false for the world spawn. |
PlayerDeathEvent
Section titled “PlayerDeathEvent”A player died. The death message, inventory/experience drops and level keeping can be changed. mc:player_death · id 112 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Killer |
Entity |
no | The entity responsible (none if there is none). |
Cause |
enum:DamageCause |
no | The damage cause. |
DeathMessage |
component |
yes | Broadcast to everybody (empty = none). |
DropInventory |
bool |
yes | Drop the items (false keeps them, like keepInventory). Only the items: the experience is controlled by the two fields below. |
KeepLevel |
bool |
yes | Keep the experience level through the respawn (default: the keepInventory rule). True drops no experience orbs. |
DropExperience |
int |
yes | Experience points dropped as orbs at the death position (default the vanilla amount min(level*7, 100), 0 with keepInventory); independent of drop_inventory. |
PlayerCreativeSlotEvent
Section titled “PlayerCreativeSlotEvent”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. mc:player_creative_slot · id 129 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Slot |
int |
no | The menu slot (1-45), or -1 for a drop. |
Item |
item |
no | The stack the client wants. |
PlayerItemHeldEvent
Section titled “PlayerItemHeldEvent”A player selected another hotbar slot. Cancel to revert the selection. mc:player_item_held · id 113 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
PreviousSlot |
int |
no | Hotbar slot before (0-8). |
NewSlot |
int |
no | Hotbar slot selected (0-8). |
PlayerSwapHandsEvent
Section titled “PlayerSwapHandsEvent”A player swapped the main hand and off hand items (F key). Cancel to keep them. mc:player_swap_hands · id 114 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
MainHand |
item |
no | The item that moves to the off hand. |
OffHand |
item |
no | The item that moves to the main hand. |
PlayerDropItemEvent
Section titled “PlayerDropItemEvent”A player drops an item from the hotbar or inventory (drop key). Cancel to keep it. mc:player_drop_item · id 115 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Item |
item |
no | The item (a single one, or the whole stack for the control-drop). |
WholeStack |
bool |
no | Control-drop of the whole stack. |
PlayerPickupItemEvent
Section titled “PlayerPickupItemEvent”A player is about to pick up an item entity. Cancel to leave it on the ground. mc:player_pickup_item · id 116 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
ItemEntity |
Entity |
no | The item entity. |
Item |
item |
no | The stack on the ground. |
PlayerConsumeEvent
Section titled “PlayerConsumeEvent”A player finished eating or drinking. Cancel to prevent the effects and the item consumption. mc:player_consume · id 117 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Item |
item |
no | The consumed item. |
Hand |
enum:Hand |
no | The hand. |
PlayerInteractEvent
Section titled “PlayerInteractEvent”A player clicked (left or right, air or block). Cancel to stop the default action: block breaking start, block use, item use. mc:player_interact · id 118 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Action |
enum:InteractAction |
no | What was clicked. |
Hand |
enum:Hand |
no | The hand. |
Item |
item |
no | The item in that hand. |
Pos |
BlockPos |
no | The clicked block (only for block actions). |
Face |
enum:BlockFace |
no | The clicked face (only for block actions). |
HasBlock |
bool |
no | Whether pos/face are valid. |
PlayerInteractEntityEvent
Section titled “PlayerInteractEntityEvent”A player right-clicked an entity. Cancel to stop the interaction. mc:player_interact_entity · id 119 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Target |
Entity |
no | The clicked entity. |
Hand |
enum:Hand |
no | The hand. |
Item |
item |
no | The item in that hand. |
PlayerToggleSneakEvent
Section titled “PlayerToggleSneakEvent”A player started or stopped sneaking. Cancel to ignore the change. mc:player_toggle_sneak · id 120 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Sneaking |
bool |
no | The new sneaking state. |
PlayerToggleSprintEvent
Section titled “PlayerToggleSprintEvent”A player started or stopped sprinting. Cancel to ignore the change. mc:player_toggle_sprint · id 121 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Sprinting |
bool |
no | The new sprinting state. |
PlayerToggleFlightEvent
Section titled “PlayerToggleFlightEvent”A player started or stopped flying (creative / may-fly). Cancel to ignore the change. mc:player_toggle_flight · id 122 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Flying |
bool |
no | The new flying state. |
PlayerGameModeChangeEvent
Section titled “PlayerGameModeChangeEvent”A player’s game mode is about to change. Cancel to keep the old one. mc:player_game_mode_change · id 123 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
OldMode |
enum:GameMode |
no | The current mode. |
NewMode |
enum:GameMode |
no | The new mode. |
Cause |
enum:GameModeChangeCause |
no | Why. |
PlayerTeleportEvent
Section titled “PlayerTeleportEvent”A player is about to be teleported (command, plugin, ender pearl, …). Cancel to stay; the destination may be changed. mc:player_teleport · id 124 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
From |
Vec3d |
no | Current position. |
To |
Vec3d |
yes | Destination position. |
FromWorld |
world |
no | Current dimension. |
ToWorld |
world |
no | Destination dimension. |
Cause |
enum:TeleportCause |
no | Why. |
PlayerPortalEvent
Section titled “PlayerPortalEvent”A player is about to travel through a portal (nether portal, end portal, end gateway). Cancel to stay. mc:player_portal · id 125 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
From |
Vec3d |
no | Current position. |
FromWorld |
world |
no | Current dimension. |
ToWorld |
world |
no | Destination dimension. |
Cause |
enum:TeleportCause |
no | Which portal. |
PlayerChangedWorldEvent
Section titled “PlayerChangedWorldEvent”A player arrived in another dimension. mc:player_changed_world · id 126 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
FromWorld |
world |
no | The dimension left. |
ToWorld |
world |
no | The dimension entered. |
PlayerResourcePackStatusEvent
Section titled “PlayerResourcePackStatusEvent”A client reported the state of a pushed resource pack. mc:player_resource_pack_status · id 127 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
PackId |
Uuid |
no | The pack id given in the push. |
Status |
enum:ResourcePackStatus |
no | The reported state. |
PlayerLevelChangeEvent
Section titled “PlayerLevelChangeEvent”A player’s experience level changed. mc:player_level_change · id 128 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
OldLevel |
int |
no | Level before. |
NewLevel |
int |
no | Level after. |
BlockBreakEvent
Section titled “BlockBreakEvent”A player is about to break a block. Cancel to keep the block (the client is resynced). mc:block_break · id 20 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Pos |
BlockPos |
no | The block. |
BlockState |
blockstate |
no | The block state about to be broken. |
DropItems |
bool |
yes | Whether the block drops its loot (the experience is controlled by experience). |
Experience |
int |
yes | The experience orbs dropped by the block, pre-filled with what vanilla would drop (ores, spawners, sculk; silk touch applied). Set 0 to drop none or any amount to drop that many; independent of drop_items. |
Tool |
item |
no | The item in the main hand. |
BlockPlaceEvent
Section titled “BlockPlaceEvent”A player is about to place a block. Cancel to refuse; ‘block_state’ may be rewritten. mc:block_place · id 21 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Pos |
BlockPos |
no | Where the block goes. |
Against |
BlockPos |
no | The clicked block. |
BlockState |
blockstate |
yes | The state that will be placed. |
Hand |
byte |
no | The hand (Hand). |
Item |
item |
no | The block item used. |
BlockDamageEvent
Section titled “BlockDamageEvent”A player started digging a block. Cancel to stop the dig. Set InstaBreak to break it at once. mc:block_damage · id 180 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Player |
player |
no | The player. |
Pos |
BlockPos |
no | The block. |
Face |
enum:BlockFace |
no | The face being dug. |
Tool |
item |
no | The item in the main hand. |
InstaBreak |
bool |
yes | Break the block immediately (as in creative mode). |
BlockIgniteEvent
Section titled “BlockIgniteEvent”Fire is about to be placed in the world. Cancel to prevent it. mc:block_ignite · id 181 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | Where the fire goes. |
Cause |
enum:IgniteCause |
no | What ignites it. |
IgnitingEntity |
Entity |
no | The player or entity responsible, if any. |
BlockBurnEvent
Section titled “BlockBurnEvent”Fire is about to destroy a block. Cancel to keep it. mc:block_burn · id 182 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The burning block. |
BlockState |
blockstate |
no | Its state. |
BlockSpreadEvent
Section titled “BlockSpreadEvent”A block is spreading to a neighbour (grass, mycelium, vines, fire). Cancel to stop it. mc:block_spread · id 183 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The target position. |
Source |
BlockPos |
no | The spreading block. |
NewState |
blockstate |
no | The state that would be placed. |
BlockFadeEvent
Section titled “BlockFadeEvent”A block is melting, drying or fading (ice, snow, farmland, fire). Cancel to keep it. mc:block_fade · id 184 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The block. |
BlockState |
blockstate |
no | The current state. |
NewState |
blockstate |
no | The state it fades to. |
BlockFormEvent
Section titled “BlockFormEvent”A block is forming through the environment (snow, ice, concrete, obsidian …). Cancel to stop it. mc:block_form · id 185 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The position. |
BlockState |
blockstate |
no | The current state. |
NewState |
blockstate |
no | The state that forms. |
BlockGrowEvent
Section titled “BlockGrowEvent”A plant is growing (crops, stems, cactus, sugar cane, …). Cancel to stop it. mc:block_grow · id 186 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The block. |
BlockState |
blockstate |
no | The current state. |
NewState |
blockstate |
no | The state after growth. |
BlockPistonExtendEvent
Section titled “BlockPistonExtendEvent”A piston is about to extend. Cancel to keep it retracted. mc:block_piston_extend · id 187 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The piston. |
Direction |
enum:BlockFace |
no | The push direction. |
Sticky |
bool |
no | Whether it is a sticky piston. |
MovedBlocks |
int |
no | Number of blocks that move. |
BlockPistonRetractEvent
Section titled “BlockPistonRetractEvent”A piston is about to retract. Cancel to keep it extended. mc:block_piston_retract · id 188 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The piston. |
Direction |
enum:BlockFace |
no | The push direction. |
Sticky |
bool |
no | Whether it is a sticky piston. |
MovedBlocks |
int |
no | Number of blocks that move. |
BlockRedstoneEvent
Section titled “BlockRedstoneEvent”A redstone component’s output power changes. The new power may be changed. mc:block_redstone · id 189 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
World |
world |
no | The dimension. |
Pos |
BlockPos |
no | The block. |
OldPower |
int |
no | Power before (0-15). |
NewPower |
int |
yes | Power after (0-15). |
Entity
Section titled “Entity”EntitySpawnEvent
Section titled “EntitySpawnEvent”An entity is about to be added to the world. Cancel to prevent it. mc:entity_spawn · id 30 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Entity |
Entity |
no | The entity (already created). |
EntityType |
key.entity_type |
no | The entity type key, e.g. minecraft:zombie. |
Position |
Vec3d |
no | Where it appears. |
Reason |
enum:SpawnReason |
no | Why it spawns. |
EntityDamageEvent
Section titled “EntityDamageEvent”A living entity is about to take damage. Cancel to negate it. ‘amount’ (the damage after armor and enchantments, before absorption) may be rewritten. mc:entity_damage · id 31 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Target |
Entity |
no | The damaged entity. |
Attacker |
Entity |
no | The responsible entity, none when there is no attacking entity. |
DamageType |
key.damage_type |
no | The damage type key, e.g. minecraft:fall. |
Amount |
float |
yes | Final damage after armor and enchantments. |
Cause |
enum:DamageCause |
no | The cause derived from the damage type. |
RawAmount |
float |
no | Damage before armor and enchantments. |
BlockSource |
BlockPos |
no | Position of the block that caused the damage. |
HasBlockSource |
bool |
no | Whether block_source is valid (cactus, magma, fire, …). |
EntityDeathEvent
Section titled “EntityDeathEvent”A living entity died. mc:entity_death · id 32 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Entity |
Entity |
no | The entity. |
Killer |
Entity |
no | The responsible entity (none if there is none). |
DamageType |
key.damage_type |
no | The damage type key, e.g. minecraft:player_attack. |
Cause |
enum:DamageCause |
no | The cause derived from the damage type. |
EntityCombustEvent
Section titled “EntityCombustEvent”An entity is about to be set on fire. Cancel to prevent it; the duration may be changed. mc:entity_combust · id 221 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Entity |
Entity |
no | The entity. |
DurationTicks |
int |
yes | Burn time in ticks. |
Source |
Entity |
no | The entity that ignites it, if any. |
Network
Section titled “Network”PacketReceiveEvent
Section titled “PacketReceiveEvent”A decoded-frame packet arrived (payload excludes the packet id). Cancel to drop it. mc:packet_receive · id 40 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Connection |
ulong |
no | Connection id. |
Player |
player |
no | The player entity (none before play). |
State |
byte |
no | Connection state. |
PacketId |
int |
no | Packet id. |
Payload |
NativeBytes |
no | Packet body (borrowed). |
PacketSendEvent
Section titled “PacketSendEvent”RESERVED: not fired yet (the per-connection send path encodes shared frames). A packet is about to be sent to one connection. mc:packet_send · id 41 · cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Connection |
ulong |
no | Connection id. |
Player |
player |
no | The player entity (none before play). |
State |
byte |
no | Connection state. |
PacketId |
int |
no | Packet id. |
Payload |
NativeBytes |
no | Packet body (borrowed). |
ChunkLoadEvent
Section titled “ChunkLoadEvent”A chunk became loaded. mc:chunk_load · id 50 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Dimension |
int |
no | Dimension index. |
X |
int |
no | Chunk x. |
Z |
int |
no | Chunk z. |
NewlyGenerated |
bool |
no | True when the chunk was generated, false when loaded from disk. |
ChunkUnloadEvent
Section titled “ChunkUnloadEvent”A chunk is about to be unloaded. mc:chunk_unload · id 51 · not cancellable · engine: fired · type reference
| Field | Type | Mutable | Description |
|---|---|---|---|
Dimension |
int |
no | Dimension index. |
X |
int |
no | Chunk x. |
Z |
int |
no | Chunk z. |