Event
onPlaceBlock
This is a function decorator.
The decorated function will be called when a player places a block.
Parameters
| Parameter | Description | Type | Default |
|---|---|---|---|
| block | The block you want to detect. | String | - |
- The
@sis the player who placed the block. - The
execution positionis NOT the position of the block that the player placed, but the position of the player. It's because currently we haven't figured out stable way to get the position of the block that the player placed.
Example
Use with raycast(see raycast) to detect the block that the player just placed. (It's not promised to be the exact block that the player placed)