Player api

This commit is contained in:
2026-10-13 22:59:48 -03:00
parent b34e97e487
commit a10b15a3fd
22 changed files with 581 additions and 89 deletions
+4 -3
View File
@@ -61,9 +61,10 @@ showed. These events fire for **every** player's actions, since they all go thro
### Order
Handlers run in the order they subscribed, and mods' `setup` functions run in [load order](registries.md#loading). For
`block_interact`, the before event runs first, then the block's own components' `on_interact`, rules before handlers. If
no component handled the click and the held item has no `on_use`, the held block is placed, which fires `block_place`.
Cancelling it undoes what the clicking player's client guessed, like a trapdoor it showed opening.
`block_interact`, the before event runs first, then the block's own components' `on_interact`, rules before handlers,
unless the player is [sneaking](../entities/players.md#sneaking) with an item in hand. If no component handled the click
and the held item has no `on_use`, the held block is placed, which fires `block_place`. Cancelling it undoes what the
clicking player's client guessed, like a trapdoor it showed opening.
## Errors