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"

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'

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'

Last updated

Was this helpful?