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

Class: PlayerInteractWithBlockAfterEvent

event player block

Beta

包含关于玩家成功与方块交互后事件的信息。

Contains information regarding an event after a player successfully interacts with a block.

Properties

beforeItemStack?

readonly optional beforeItemStack?: ItemStack

Beta

Remarks

交互成功前的物品堆,如果为空手则为 undefined。

The ItemStack before the interaction succeeded, or undefined if hand is empty.


block

readonly block: Block

Beta

Remarks

将要被交互的方块。

The block that will be interacted with.


blockFace

readonly blockFace: Direction

Beta

Remarks

正在被交互的方块面。

The face of the block that is being interacted with.


faceLocation

readonly faceLocation: Vector3

Beta

Remarks

相对于方块底部西北角的位置,物品将放置在此处。

Location relative to the bottom north-west corner of the block where the item is placed.


isFirstEvent

readonly isFirstEvent: boolean

Beta

Remarks

如果事件是在玩家首次按下交互按钮时触发的,此值为 true;如果是按住交互按钮时触发的事件,则为 false。

This value will be true if the event was triggered on players initial interaction button press and false on events triggered from holding the interaction button.


itemStack?

readonly optional itemStack?: ItemStack

Beta

Remarks

交互成功后的物品堆,如果为空手则为 undefined。

The ItemStack after the interaction succeeded, or undefined if hand is empty.


player

readonly player: Player

Beta

Remarks

此事件的源玩家。

Source Player for this event.

同领域相关