JSM Developer API Documentation
    Preparing search index...

    Interface BlockEvent

    This interface is provided to the ModDefinition.eventOnBlockPlace and ModDefinition.eventOnBlockDestroy function when the player places or destroys a block.

    interface BlockEvent {
        block: Block;
        x: number;
        y: number;
        z: number;
    }
    Index

    Properties

    Properties

    block: Block

    The Block that was destroyed or placed

    x: number

    The X position of the block.

    This does not return the X position of the player. For the X position of the player, use Player.getX

    y: number

    The Y position of the block.

    This does not return the Y position of the player. For the Y position of the player, use Player.getY

    z: number

    The Z position of the block.

    This does not return the Z position of the player. For the Z position of the player, use Player.getZ