The event system allows you to hook into game events and execute code when they occur.
Fired when a particle is spawned in the world.
Fired when the player left-clicks a block without breaking it.
Fired when a block changes in the world (e.g., placed, broken, or state change).
Fired every time the user types something in the chat input and presses enter. Return true from the event handler to prevent the message from being sent to chat.
Fired when a chunk is loaded into memory by the client.
Fired when a chunk is unloaded from memory.
Fired when the player finishes eating food or drinking a potion.
Fired when the client disconnects from a server (kicked or manual disconnect)
Fired when the player's movement input changes (WASD, Jump, Sneak states).
Fired when the texture of a held map item is updated.
Fired when the user scrolls the mouse wheel.
Fired specifically during the movement calculation phase of the tick.
Fired when the client receives or displays an internal notification (e.g., a module toggling on/off).
Fired when a network packet is sent to or received from the server.
Fired every time the game renders a frame while being connected to a server.
Fired every time the game renders a frame, even if you're in the menu.
Fired when the game attempts to play a sound effect.
Fired when a player sends a message to chat.
Fired when the local player dies.
Fired when the local player entity is fully initialized in the world.
Fired after a configuration is loaded.
Fired after a configuration is saved.
Fired after a frame is rendered.
Fired before a configuration is loaded.
Fired before a configuration is saved.
Fired when an entity (player, mob, item) is being rendered.
Fired when the game is shutting down or when scripts are being unloaded/reloaded.
Fired before a chat command is sent to the server.
Fired every tick (20 times per second).
Fired when the world is changed, such as when joining a lobby.