Class: PlayerBreakBlockAfterEventSignal
Manages callbacks that are connected to when a player breaks a block.
Constructors
new PlayerBreakBlockAfterEventSignal()
private
new PlayerBreakBlockAfterEventSignal():PlayerBreakBlockAfterEventSignal
Returns
PlayerBreakBlockAfterEventSignal
Methods
subscribe()
subscribe(
callback
,options
?): (arg
) =>void
Parameters
Parameter | Type |
---|---|
callback | (arg ) => void |
options ? | BlockEventOptions |
Returns
Function
Parameters
Parameter | Type |
---|---|
arg | PlayerBreakBlockAfterEvent |
Returns
void
Remarks
Adds a callback that will be called when a block is broken by a player.
This function can't be called in read-only mode.
unsubscribe()
unsubscribe(
callback
):void
Parameters
Parameter | Type |
---|---|
callback | (arg ) => void |
Returns
void
Remarks
Removes a callback from being called when a player breaks a block.
This function can't be called in read-only mode.