Class: PlayerInteractWithBlockBeforeEvent
event player blockBeta
包含有关玩家与方块交互之前的事件信息。
Contains information regarding an event before a player interacts with a block.
Properties
block
readonlyblock:Block
Beta
将被交互的方块。
Remarks
The block that will be interacted with.
blockFace
readonlyblockFace:Direction
Beta
正在被交互的方块面。
Remarks
The face of the block that is being interacted with.
cancel
cancel:
boolean
Beta
如果设置为 true,交互将被取消。
Remarks
If set to true the interaction will be cancelled.
faceLocation
readonlyfaceLocation:Vector3
Beta
相对于方块底部西北角的物品放置位置。
Remarks
Location relative to the bottom north-west corner of the block where the item is placed.
isFirstEvent
readonlyisFirstEvent:boolean
Beta
如果事件是在玩家初始交互按钮按下时触发的,则为 true;如果在按住交互按钮时触发的事件,则为 false。
Remarks
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?
readonlyoptionalitemStack?:ItemStack
Beta
交互中正在使用的物品堆,如果为空手则为 undefined。
Remarks
The item stack that is being used in the interaction, or undefined if empty hand.
player
readonlyplayer:Player
Beta
此事件的源玩家。
Remarks
Source Player for this event.
