Private constructorReadonly entityFires before an entity is removed from the world (for example, unloaded or removed after being killed.)
Readonly itemThis event fires when an item is successfully used by a player.
Readonly itemThis event fires when an item is used on a block by a player.
Readonly playerThis event fires before a block is broken by a player.
Readonly playerFires when a player leaves the game.
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)