Class: PlayerInteractWithEntityBeforeEvent
event player entityBeta
包含关于玩家与实体交互前事件的信息。
Contains information regarding an event before a player interacts with an entity.
Properties
cancel
cancel:
boolean
Beta
Remarks
如果设置为 true,交互将被取消。
If set to true the interaction will be cancelled.
itemStack?
readonlyoptionalitemStack?:ItemStack
Beta
Remarks
交互中正在使用的物品堆,如果为空手则为 undefined。
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.
target
readonlytarget:Entity
Beta
Remarks
将要被交互的实体。
The entity that will be interacted with.
