Event API
Current working functions
event.addHooks(eventType,callback) event.addCommand(command,callback)
Current working values
event.pass -- Returning this value does nothing for other hooks event.grab -- Returning this value avoid the other hooks to be executed event.cancel -- Returning this value cancel the current event (for example : onBlockBreak will stop breaking of the block)
Event hooks available
- onPlayerJoin - called when a player joined the game - args = player
- onPlayerLeft - called when a player left the game - args = player
- onBlockBreak - called when a block is broken in the world - args = player,pos(as table)