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

    Class ItemComponentHitEntityEvent

    Contains information regarding when an item is used to hit an entity.

    export class ItemComponentHitEntityEvent {
    private constructor();
    readonly attackingEntity: Entity;
    readonly hadEffect: boolean;
    readonly hitEntity: Entity;
    readonly itemStack?: ItemStack;
    }
    Index

    Constructors

    Properties

    attackingEntity: Entity

    The attacking entity.

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

    hadEffect: boolean

    Whether the hit landed or had any effect.

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

    hitEntity: Entity

    The entity being hit.

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

    itemStack?: ItemStack

    The item stack used to hit the entity.

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