跳到主要内容

Class: PlayerInteractWithEntityBeforeEventSignal

Manages callbacks that are connected to before a player interacts with an entity.

Constructors

new PlayerInteractWithEntityBeforeEventSignal()

private new PlayerInteractWithEntityBeforeEventSignal(): PlayerInteractWithEntityBeforeEventSignal

Returns

PlayerInteractWithEntityBeforeEventSignal

Methods

subscribe()

subscribe(callback): (arg) => void

Parameters

ParameterType
callback(arg) => void

Returns

Function

Parameters
ParameterType
argPlayerInteractWithEntityBeforeEvent
Returns

void

Remarks

Adds a callback that will be called before a player interacts with an entity.

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 interacts with an entity.

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