Skip to content

onPlayerPlaceBlock

KabanFriends edited this page Nov 27, 2022 · 1 revision

function: onPlayerPlaceBlock(event)

A function that is called when a player places 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 placed.

x : number

  • X coordinate of the block that the player placed.

y : number

  • Y coordinate of the block that the player placed.

z : number

  • Z coordinate of the block that the player placed.

cancel()

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