Block Events
BLOCK INTERACT
Event called when a player clicks on a block.
example:
type: block_interact
conditions:
- '%block_x% == 20'
- '%block_y% == 60'
- '%block_z% == 20'
- '%block_world% == lobby'
- '%block% == STONE_BUTTON'
- '%action_type% == RIGHT_CLICK'
actions:
default:
- "message: &aYou''ve received $500!"
- "console_command: eco give %player% 500"
Variables:
%action_type% (RIGHT_CLICK, LEFT_CLICK, SHIFT_RIGHT_CLICK, SHIFT_LEFT_CLICK
or PHYSICAL. Use PHYSICAL when you want to check players on pressure plates)
ConditionalEvents block variables
ConditionalEvents item variables (for item in hand)
BLOCK BREAK
Event called when a player breaks a block.
example:
type: block_break
conditions:
- '%block_head_texture% != %empty%'
actions:
default:
- 'cancel_event: true'
- "message: &cYou can''t break heads with texture!"
- 'playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1'
Variables:
ConditionalEvents block variables
ConditionalEvents item variables (for item in hand)
BLOCK PLACE
Event called when a player places a block.
example:
type: block_place
conditions:
- '%block_world% == spawn'
actions:
default:
- 'cancel_event: true'
- "message: &cYou can''t place blocks on this world."
- 'playsound: BLOCK_NOTE_BLOCK_PLING;10;0.1'
Variables:
ConditionalEvents block variables
ConditionalEvents item variables (for item in hand)
Last updated
Was this helpful?