Event System
Hook into game events with @EventHandler. Player connections, chat, combat, and more.
Player Events
8PlayerChatEvent
Cancellable
Fired when a player sends a chat message. Use getSender() to get PlayerRef (NOT Player!). Cast to Player via store.getComponent() if needed.
PlayerConnectEvent
Fired when a player connects to the server. Use to handle initial setup.
PlayerDisconnectEvent
Fired when a player disconnects from the server.
PlayerMouseButtonEvent
Cancellable
Fired when player presses or releases a mouse button.
PlayerMouseMotionEvent
Cancellable
Fired when player moves their mouse/camera.
PlayerReadyEvent
Fired when a player is fully loaded and ready in the world. Use for welcome messages, loading player data, etc.
PlayerSetupConnectEvent
Cancellable
Pre-connection authentication. Cancel to reject connection.
PlayerSetupDisconnectEvent
Pre-disconnection