@minecraft/server
    Preparing search index...

    Class WorldBeforeEvents

    A set of events that fire before an actual action occurs. In most cases, you can potentially cancel or modify the impending event. Note that in before events any APIs that modify gameplay state will not function and will throw an error. (e.g., dimension.spawnEntity)

    Index

    Properties

    This event is triggered after an event has been added to an entity.

    This property can be read in early-execution mode.

    Fires before an entity is removed from the world (for example, unloaded or removed after being killed.)

    This property can be read in early-execution mode.

    This event is fired after an explosion occurs.

    This property can be read in early-execution mode.

    This event fires when an item is successfully used by a player.

    This property can be read in early-execution mode.

    This property is deprecated and will be removed in 2.0.0.

    This event fires when an item is used on a block by a player.

    This property can be read in early-execution mode.

    This event fires before a block is broken by a player.

    This property can be read in early-execution mode.

    This property can be read in early-execution mode.

    Fires before a player interacts with a block.

    This property can be read in early-execution mode.

    Fires before a player interacts with an entity.

    This property can be read in early-execution mode.

    Fires when a player leaves the game.

    This property can be read in early-execution mode.

    This property can be read in early-execution mode.

    This property is deprecated and will be removed in 2.0.0.

    This event fires immediately when the script environment is initialized on a World. Not all script functionality may be available. For guaranteed access to world state, use the world initialize after event.

    This property can be read in early-execution mode.