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/GameRuleChangeAfterEventSignal.md.

Class: GameRuleChangeAfterEventSignal

event

Beta

管理当 world.gameRules 属性发生变化时所连接的回调。

Manages callbacks that are connected to when a world.gameRules property has changed.

Methods

subscribe()

subscribe(callback): (arg0) => void

World Mutation Early Execution Beta

Parameters

callback

(arg0) => void

Returns

(arg0) => void

Remarks

添加当 world.gameRules 属性发生变化时会被调用的回调。

Adds a callback that will be called when a world.gameRules property is changed.


unsubscribe()

unsubscribe(callback): void

World Mutation Early Execution Beta

Parameters

callback

(arg0) => void

Returns

void

Remarks

移除当 world.gameRules 属性发生变化时不再被调用的回调。

Removes a callback from being called when a world.gameRules property is changed.

同领域相关