Script API - v1.26.10
    Preparing search index...

    Class PlayerInteractWithEntityAfterEvent

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

    export class PlayerInteractWithEntityAfterEvent {
    private constructor();
    readonly beforeItemStack?: ItemStack;
    readonly itemStack?: ItemStack;
    readonly player: Player;
    readonly target: Entity;
    }
    Index

    Constructors

    Properties

    beforeItemStack?: ItemStack

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

    This property can't be read in early-execution mode.

    itemStack?: ItemStack

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

    This property can't be read in early-execution mode.

    player: Player

    Source Player for this event.

    This property can't be read in early-execution mode.

    target: Entity

    The entity that will be interacted with.

    This property can't be read in early-execution mode.