Skip to content

Event types

The event catalogue: one struct per event, generated from src/scripting/events.json.

Type Kind Description
BlockBreakEvent struct A player is about to break a block.
BlockBurnEvent struct Fire is about to destroy a block.
BlockDamageEvent struct A player started digging a block.
BlockFadeEvent struct A block is melting, drying or fading (ice, snow, farmland, fire).
BlockFormEvent struct A block is forming through the environment (snow, ice, concrete, obsidian …).
BlockGrowEvent struct A plant is growing (crops, stems, cactus, sugar cane, …).
BlockIgniteEvent struct Fire is about to be placed in the world.
BlockPistonExtendEvent struct A piston is about to extend.
BlockPistonRetractEvent struct A piston is about to retract.
BlockPlaceEvent struct A player is about to place a block.
BlockRedstoneEvent struct A redstone component’s output power changes.
BlockSpreadEvent struct A block is spreading to a neighbour (grass, mycelium, vines, fire).
ChunkLoadEvent struct A chunk became loaded.
ChunkUnloadEvent struct A chunk is about to be unloaded.
CommandsRegisteredEvent struct The command tree changed (a plugin registered or removed commands, or a permission changed).
CraftItemEvent struct A player took the result of a crafting recipe (cancel the InventoryClick event of the result slot to prevent crafting).
CustomBlockBreakEvent struct A player is breaking a custom block (fired by the content layer after BlockBreak).
CustomBlockInteractEvent struct A player right-clicked a custom block (fired by the content layer after PlayerInteractBlock).
CustomBlockPlaceEvent struct A player is placing a custom block with a custom item.
CustomItemUseEvent struct A player used a custom item (right click in the air or on a block).
EnchantItemEvent struct A player is enchanting an item at an enchanting table.
EntityCombustEvent struct An entity is about to be set on fire.
EntityDamageEvent struct A living entity is about to take damage.
EntityDeathEvent struct A living entity died.
EntitySpawnEvent struct An entity is about to be added to the world.
FurnaceBurnEvent struct A furnace is about to consume fuel.
FurnaceSmeltEvent struct A furnace, smoker or blast furnace finished smelting an item.
InventoryClickEvent struct A player clicked a slot of an open container (also the player inventory).
InventoryCloseEvent struct A player closed a container.
InventoryDragEvent struct A player finished dragging a stack over several slots.
InventoryOpenEvent struct A player is about to open a container (chest, furnace, crafting table, …).
MenuClickEvent struct A player clicked in a custom GUI (Menu) of a plugin, after InventoryClick.
MenuCloseEvent struct A plugin menu was closed for a player (for any reason).
NpcInteractEvent struct A player clicked an NPC made with Npcs.Create (a left click is an attack, a right click an interaction).
PacketReceiveEvent struct A decoded-frame packet arrived (payload excludes the packet id).
PacketSendEvent struct RESERVED: not fired yet (the per-connection send path encodes shared frames).
PermissionChangedEvent struct A permission entry of a player changed (or of a group or everything: AllPlayers is true).
PermissionsReloadedEvent struct The permission backend was reloaded from disk (/perm reload or Permissions.Reload).
PlayerChangedWorldEvent struct A player arrived in another dimension.
PlayerChatEvent struct A player sent a chat message.
PlayerCommandEvent struct A player ran a command (without the leading slash).
PlayerConsumeEvent struct A player finished eating or drinking.
PlayerCreativeSlotEvent struct A creative-mode player put a stack into an inventory slot from the creative menu (slot -1: threw one out of the menu).
PlayerDeathEvent struct A player died.
PlayerDropItemEvent struct A player drops an item from the hotbar or inventory (drop key).
PlayerGameModeChangeEvent struct A player’s game mode is about to change.
PlayerInteractBlockEvent struct A player right-clicked a block (fired after PlayerInteract).
PlayerInteractEntityEvent struct A player right-clicked an entity.
PlayerInteractEvent struct A player clicked (left or right, air or block).
PlayerItemHeldEvent struct A player selected another hotbar slot.
PlayerJoinEvent struct A player entity entered the play state.
PlayerKickEvent struct A player is about to be kicked by a command or plugin.
PlayerLevelChangeEvent struct A player’s experience level changed.
PlayerMoveEvent struct A player moved or rotated.
PlayerPickupItemEvent struct A player is about to pick up an item entity.
PlayerPortalEvent struct A player is about to travel through a portal (nether portal, end portal, end gateway).
PlayerPreLoginEvent struct A client finished authentication and is about to enter the configuration phase.
PlayerQuitEvent struct A player disconnected (the entity is still alive during dispatch).
PlayerResourcePackStatusEvent struct A client reported the state of a pushed resource pack.
PlayerRespawnEvent struct A player is respawning.
PlayerSwapHandsEvent struct A player swapped the main hand and off hand items (F key).
PlayerTeleportEvent struct A player is about to be teleported (command, plugin, ender pearl, …).
PlayerToggleFlightEvent struct A player started or stopped flying (creative / may-fly).
PlayerToggleSneakEvent struct A player started or stopped sneaking.
PlayerToggleSprintEvent struct A player started or stopped sprinting.
PluginDisableEvent struct A plugin was disabled (unload or hot reload); its registrations are already released.
PluginEnableEvent struct A plugin finished enabling.
PortalCreateEvent struct A nether portal frame is about to be filled or a destination portal built.
PrepareAnvilEvent struct The anvil inputs changed and a result was computed.
PrepareCraftEvent struct The crafting grid matched a recipe.
PrivateMessageEvent struct A player sent a private message (/msg, /tell, /w) to one player.
ServerListPingEvent struct A client asked for the server list status.
ServerStartEvent struct Fired once after the server finished starting, before the first tick.
ServerStopEvent struct Fired once when the server begins shutting down.
TickEndEvent struct Fired at the end of every server tick.
TickStartEvent struct Fired at the start of every server tick.
TimeSkipEvent struct The day time jumped (sleeping through the night, /time set or /time add).
WeatherChangeEvent struct The rain started or stopped (overworld weather).