Skip to content

Getting Started

The event system allows you to hook into game events and execute code when they occur.

add_particle

Fired when a particle is spawned in the world.

block_click

Fired when the player left-clicks a block without breaking it.

block_update

Fired when a block changes in the world (e.g., placed, broken, or state change).

chat_input

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.

chunk_load

Fired when a chunk is loaded into memory by the client.

chunk_unload

Fired when a chunk is unloaded from memory.

consume

Fired when the player finishes eating food or drinking a potion.

disconnect

Fired when the client disconnects from a server (kicked or manual disconnect)

input_update

Fired when the player's movement input changes (WASD, Jump, Sneak states).

map_update

Fired when the texture of a held map item is updated.

mouse_scroll

Fired when the user scrolls the mouse wheel.

movement_tick

Fired specifically during the movement calculation phase of the tick.

notification

Fired when the client receives or displays an internal notification (e.g., a module toggling on/off).

packet

Fired when a network packet is sent to or received from the server.

paint

Fired every time the game renders a frame while being connected to a server.

paint_ui

Fired every time the game renders a frame, even if you're in the menu.

play_sound

Fired when the game attempts to play a sound effect.

player_chat

Fired when a player sends a message to chat.

player_death

Fired when the local player dies.

player_load

Fired when the local player entity is fully initialized in the world.

post_config_load

Fired after a configuration is loaded.

post_config_save

Fired after a configuration is saved.

post_render

Fired after a frame is rendered.

pre_config_load

Fired before a configuration is loaded.

pre_config_save

Fired before a configuration is saved.

render_entity

Fired when an entity (player, mob, item) is being rendered.

shutdown

Fired when the game is shutting down or when scripts are being unloaded/reloaded.

string_cmd

Fired before a chat command is sent to the server.

tick

Fired every tick (20 times per second).

world_change

Fired when the world is changed, such as when joining a lobby.