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/interfaces/PlayerSwingEventOptions.md.

Interface: PlayerSwingEventOptions

event player

Beta

传递给 @minecraft/server.PlayerSwingStartAfterEventSignal.subscribe 的接口,用于过滤哪些事件会传递给所提供的回调函数。

An interface that is passed into @minecraft/server.PlayerSwingStartAfterEventSignal.subscribe that filters out which events are passed to the provided callback.

Properties

heldItemOption?

optional heldItemOption?: HeldItemOption

Beta

Remarks

回调函数应针对的持有物品选项。如果未定义,无论玩家手中是否持有物品,回调函数都会被调用。

The held item option that the callback should be called for. If undefined, the callback will be called whether or not the player is holding an item in their hand.


swingSource?

optional swingSource?: EntitySwingSource

Beta

Remarks

回调函数应针对的 EntitySwingSource。如果未定义,回调函数将针对所有挥动来源被调用。

The EntitySwingSource that the callback should be called for. If undefined, the callback will be called for all swing sources.

同领域相关