WorldAfterEvents Class

Contains a set of events that are available across the scope of the World.

Properties

blockExplode

read-only blockExplode: BlockExplodeAfterEventSignal;

This event fires for each BlockLocation destroyed by an explosion. It is fired after the blocks have already been destroyed.

Type: BlockExplodeAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

buttonPush

read-only buttonPush: ButtonPushAfterEventSignal;

This event fires when a button is pushed.

Type: ButtonPushAfterEventSignal

chatSend

read-only chatSend: ChatSendAfterEventSignal;

This event is triggered after a chat message has been broadcast or sent to players.

Type: ChatSendAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

dataDrivenEntityTrigger

read-only dataDrivenEntityTrigger: DataDrivenEntityTriggerAfterEventSignal;

This event is fired when an entity event has been triggered that will update the component definition state of an entity.

Type: DataDrivenEntityTriggerAfterEventSignal

effectAdd

read-only effectAdd: EffectAddAfterEventSignal;

This event fires when an effect, like poisoning, is added to an entity.

Type: EffectAddAfterEventSignal

entityDie

read-only entityDie: EntityDieAfterEventSignal;

This event fires when an entity dies.

Type: EntityDieAfterEventSignal

entityHealthChanged

read-only entityHealthChanged: EntityHealthChangedAfterEventSignal;

This event fires when entity health changes in any degree.

Type: EntityHealthChangedAfterEventSignal

entityHitBlock

read-only entityHitBlock: EntityHitBlockAfterEventSignal;

This event fires when an entity hits (that is, melee attacks) a block.

Type: EntityHitBlockAfterEventSignal

entityHitEntity

read-only entityHitEntity: EntityHitEntityAfterEventSignal;

This event fires when an entity hits (that is, melee attacks) another entity.

Type: EntityHitEntityAfterEventSignal

entityHurt

read-only entityHurt: EntityHurtAfterEventSignal;

This event fires when an entity is hurt (takes damage).

Type: EntityHurtAfterEventSignal

entityLoad

read-only entityLoad: EntityLoadAfterEventSignal;

Fires when an entity is loaded.

Type: EntityLoadAfterEventSignal

entityRemove

read-only entityRemove: EntityRemoveAfterEventSignal;

Fires when an entity is removed (for example, potentially unloaded, or removed after being killed).

Type: EntityRemoveAfterEventSignal

entitySpawn

read-only entitySpawn: EntitySpawnAfterEventSignal;

This event fires when an entity is spawned.

Type: EntitySpawnAfterEventSignal

explosion

read-only explosion: ExplosionAfterEventSignal;

This event is fired after an explosion occurs.

Type: ExplosionAfterEventSignal

gameRuleChange

read-only gameRuleChange: GameRuleChangeAfterEventSignal;

This event fires when a world.gameRules property has changed.

Type: GameRuleChangeAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

itemCompleteUse

read-only itemCompleteUse: ItemCompleteUseAfterEventSignal;

This event fires when a chargeable item completes charging.

Type: ItemCompleteUseAfterEventSignal

itemReleaseUse

read-only itemReleaseUse: ItemReleaseUseAfterEventSignal;

This event fires when a chargeable item is released from charging.

Type: ItemReleaseUseAfterEventSignal

itemStartUse

read-only itemStartUse: ItemStartUseAfterEventSignal;

This event fires when a chargeable item starts charging.

Type: ItemStartUseAfterEventSignal

itemStartUseOn

read-only itemStartUseOn: ItemStartUseOnAfterEventSignal;

This event fires when a player successfully uses an item or places a block by pressing the Use Item / Place Block button. If multiple blocks are placed, this event will only occur once at the beginning of the block placement. Note: This event cannot be used with Hoe or Axe items.

Type: ItemStartUseOnAfterEventSignal

itemStopUse

read-only itemStopUse: ItemStopUseAfterEventSignal;

This event fires when a chargeable item stops charging.

Type: ItemStopUseAfterEventSignal

itemStopUseOn

read-only itemStopUseOn: ItemStopUseOnAfterEventSignal;

This event fires when a player releases the Use Item / Place Block button after successfully using an item. Note: This event cannot be used with Hoe or Axe items.

Type: ItemStopUseOnAfterEventSignal

itemUse

read-only itemUse: ItemUseAfterEventSignal;

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

Type: ItemUseAfterEventSignal

itemUseOn

read-only itemUseOn: ItemUseOnAfterEventSignal;

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

Type: ItemUseOnAfterEventSignal

leverAction

read-only leverAction: LeverActionAfterEventSignal;

A lever has been pulled.

Type: LeverActionAfterEventSignal

messageReceive

read-only messageReceive: ServerMessageAfterEventSignal;

This event is an internal implementation detail, and is otherwise not currently functional.

Type: ServerMessageAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

pistonActivate

read-only pistonActivate: PistonActivateAfterEventSignal;

This event fires when a piston expands or retracts.

Type: PistonActivateAfterEventSignal

playerBreakBlock

read-only playerBreakBlock: PlayerBreakBlockAfterEventSignal;

This event fires for a block that is broken by a player.

Type: PlayerBreakBlockAfterEventSignal

playerDimensionChange

read-only playerDimensionChange: PlayerDimensionChangeAfterEventSignal;

Fires when a player moved to a different dimension.

Type: PlayerDimensionChangeAfterEventSignal

playerGameModeChange

read-only playerGameModeChange: PlayerGameModeChangeAfterEventSignal;

Type: PlayerGameModeChangeAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

playerInputPermissionCategoryChange

read-only playerInputPermissionCategoryChange: PlayerInputPermissionCategoryChangeAfterEventSignal;

This event fires when a players input permissions change.

Type: PlayerInputPermissionCategoryChangeAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

playerInteractWithBlock

read-only playerInteractWithBlock: PlayerInteractWithBlockAfterEventSignal;

An event for when a player interacts with a block.

Type: PlayerInteractWithBlockAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

playerInteractWithEntity

read-only playerInteractWithEntity: PlayerInteractWithEntityAfterEventSignal;

This event fires when a player interacts with an entity.

Type: PlayerInteractWithEntityAfterEventSignal

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.

playerJoin

read-only playerJoin: PlayerJoinAfterEventSignal;

This event fires when a player joins a world. See also playerSpawn for another related event you can trap for when a player is spawned the first time within a world.

Type: PlayerJoinAfterEventSignal

playerLeave

read-only playerLeave: PlayerLeaveAfterEventSignal;

This event fires when a player leaves a world.

Type: PlayerLeaveAfterEventSignal

playerPlaceBlock

read-only playerPlaceBlock: PlayerPlaceBlockAfterEventSignal;

This event fires for a block that is placed by a player.

Type: PlayerPlaceBlockAfterEventSignal

playerSpawn

read-only playerSpawn: PlayerSpawnAfterEventSignal;

This event fires when a player spawns or respawns. Note that an additional flag within this event will tell you whether the player is spawning right after join vs. a respawn.

Type: PlayerSpawnAfterEventSignal

pressurePlatePop

read-only pressurePlatePop: PressurePlatePopAfterEventSignal;

A pressure plate has popped back up (i.e., there are no entities on the pressure plate.)

Type: PressurePlatePopAfterEventSignal

pressurePlatePush

read-only pressurePlatePush: PressurePlatePushAfterEventSignal;

A pressure plate has pushed (at least one entity has moved onto a pressure plate.)

Type: PressurePlatePushAfterEventSignal

projectileHitBlock

read-only projectileHitBlock: ProjectileHitBlockAfterEventSignal;

This event fires when a projectile hits a block.

Type: ProjectileHitBlockAfterEventSignal

projectileHitEntity

read-only projectileHitEntity: ProjectileHitEntityAfterEventSignal;

This event fires when a projectile hits an entity.

Type: ProjectileHitEntityAfterEventSignal

targetBlockHit

read-only targetBlockHit: TargetBlockHitAfterEventSignal;

A target block was hit.

Type: TargetBlockHitAfterEventSignal

tripWireTrip

read-only tripWireTrip: TripWireTripAfterEventSignal;

A trip wire was tripped.

Type: TripWireTripAfterEventSignal

weatherChange

read-only weatherChange: WeatherChangeAfterEventSignal;

This event will be triggered when the weather changes within Minecraft.

Type: WeatherChangeAfterEventSignal

worldInitialize

read-only worldInitialize: WorldInitializeAfterEventSignal;

This event fires when the script environment is initialized on a World.

Type: WorldInitializeAfterEventSignal