Skip to content

onPlayerBreakBlock

KabanFriends edited this page Nov 27, 2022 · 1 revision

function: onPlayerBreakBlock(event)

A function that is called when a player breaks a block.
The event object contains following fields:

player : Player

  • The Player that triggered this event.

block : number

  • ID of the block that the player broke.

x : number

  • X coordinate of the block that the player broke.

y : number

  • Y coordinate of the block that the player broke.

z : number

  • Z coordinate of the block that the player broke.

cancel()

  • Cancels the event. The block will not be broken if the event is cancelled.