PlayerPlaceBlockBeforeEventSignal Class

Caution

This class is still in pre-release. Its signature may change or it may be removed in future releases.

Manages callbacks that are connected to before a block is placed by a player.

Methods

subscribe

subscribe(callback: (arg: PlayerPlaceBlockBeforeEvent) => void, options?: BlockEventOptions): (arg: PlayerPlaceBlockBeforeEvent) => void

Adds a callback that will be called before a block is placed by a player.

Parameters

Returns (arg: PlayerPlaceBlockBeforeEvent) => void

Important

This function can't be called in read-only mode.

unsubscribe

unsubscribe(callback: (arg: PlayerPlaceBlockBeforeEvent) => void): void

Removes a callback from being called before an block is placed by a player.

Parameters

Important

This function can't be called in read-only mode.