For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/PlayerInteractWithBlockBeforeEventSignal.md.

Class: PlayerInteractWithBlockBeforeEventSignal

event player block

Beta

管理在玩家与方块交互之前相关的回调。

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

Methods

subscribe()

subscribe(callback): (arg0) => void

World Mutation Early Execution Beta

添加一个将在玩家与方块交互之前调用的回调。

Parameters

callback

(arg0) => void

Tip

此闭包将以受限执行权限调用。 This closure is called with restricted-execution privilege.

Returns

Tip

以受限执行权限调用的闭包。 Closure that is called with restricted-execution privilege.

(arg0) => void

Remarks

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


unsubscribe()

unsubscribe(callback): void

World Mutation Early Execution Beta

移除一个在玩家与方块交互之前调用的回调。

Parameters

callback

(arg0) => void

Tip

此闭包将以受限执行权限调用。 This closure is called with restricted-execution privilege.

Returns

void

Remarks

Removes a callback from being called before a player interacts with a block.

同领域相关