跳到主要内容

Class: PlayerInteractWithEntityBeforeEvent

Contains information regarding an event before a player interacts with an entity.

Constructors

new PlayerInteractWithEntityBeforeEvent()

private new PlayerInteractWithEntityBeforeEvent(): PlayerInteractWithEntityBeforeEvent

Returns

PlayerInteractWithEntityBeforeEvent

Properties

cancel

cancel: boolean

Remarks

If set to true the interaction will be cancelled.


itemStack?

optional readonly itemStack: ItemStack

Remarks

The item stack that is being used in the interaction, or undefined if empty hand.


player

readonly player: Player

Remarks

Source Player for this event.


target

readonly target: Entity

Remarks

The entity that will be interacted with.