Skip to main content

Class: PlayerBreakBlockBeforeEventSignal

Manages callbacks that are connected to before a player breaks a block.

Constructors

new PlayerBreakBlockBeforeEventSignal()

private new PlayerBreakBlockBeforeEventSignal(): PlayerBreakBlockBeforeEventSignal

Returns

PlayerBreakBlockBeforeEventSignal

Methods

subscribe()

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

Parameters

ParameterType
callback(arg) => void
options?BlockEventOptions

Returns

Function

Parameters
ParameterType
argPlayerBreakBlockBeforeEvent
Returns

void

Remarks

Adds a callback that will be called before a block is broken 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 a player breaks a block.

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