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

    Class PlayerInteractWithBlockBeforeEvent

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

    Index

    Constructors

    Properties

    block: Block

    The block that will be interacted with.

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

    blockFace: Direction

    The face of the block that is being interacted with.

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

    cancel: boolean

    If set to true the interaction will be cancelled.

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

    faceLocation: Vector3

    Location relative to the bottom north-west corner of the block where the item is placed.

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

    isFirstEvent: boolean

    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.

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

    itemStack?: ItemStack

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

    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.