On Craftengine Block Attempt Place Event
Triggers when a player attempts to place a CraftEngine block
Fires before CraftEngine validates the placement, so it still sees attempts that end up refused. Use the regular place event when you only care about blocks that were actually placed.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
blockId | String | — | The custom block ID that triggers this event (e.g., 'namespace:block_id'). Leave empty for any custom block. |
location | Optional<Var<Position>> | — | The location where the block would be placed (optional) |
permission | String | — | A permission the player must hold to be allowed to place. Leave empty to skip the check. |
allowWhen | List<Criteria> | empty | Facts the player must satisfy to be allowed to place. When unmet, the placement is refused. |
cancel | Boolean | true | Whether to stop the placement when the requirements are unmet. Turn off to only fire the triggers. |
Common TypeWriter fields (triggers)
| Field | Type | Default | Description |
|---|---|---|---|
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
Fires when a player tries to place a block, including when it is refused. Use permission and allowWhen to set requirements: with cancel on, an unmet requirement stops the placement. Turn cancel off to only fire the triggers. An empty permission and an empty allowWhen mean no requirement. The furniture attempt-place and furniture hit events work the same way.