Skip to main content

Class: PlayerPlaceBlockBeforeEventSignal

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

Constructors

new PlayerPlaceBlockBeforeEventSignal()

private new PlayerPlaceBlockBeforeEventSignal(): PlayerPlaceBlockBeforeEventSignal

Returns

PlayerPlaceBlockBeforeEventSignal

Methods

subscribe()

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

Parameters

ParameterType
callback(arg) => void
options?BlockEventOptions

Returns

Function

Parameters
ParameterType
argPlayerPlaceBlockBeforeEvent
Returns

void

Remarks

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

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


unsubscribe()

unsubscribe(callback): void

Parameters

ParameterType
callback(arg) => void

Returns

void

Remarks

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

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