Skip to main content

Class: ExplosionBeforeEvent

Contains information regarding an explosion that has happened.

Extends

Constructors

new ExplosionBeforeEvent()

private new ExplosionBeforeEvent(): ExplosionBeforeEvent

Returns

ExplosionBeforeEvent

Overrides

ExplosionAfterEvent . constructor

Properties

cancel

cancel: boolean

Remarks

If set to true, cancels the explosion event.


dimension

readonly dimension: Dimension

Remarks

Dimension where the explosion has occurred.

Inherited from

ExplosionAfterEvent . dimension


source?

optional readonly source: Entity

Remarks

Optional source of the explosion.

Inherited from

ExplosionAfterEvent . source

Methods

getImpactedBlocks()

getImpactedBlocks(): Block[]

Returns

Block[]

Inherited from

ExplosionAfterEvent . getImpactedBlocks

Remarks

A collection of blocks impacted by this explosion event.


setImpactedBlocks()

setImpactedBlocks(blocks): void

Parameters

ParameterTypeDescription
blocksBlock[]New list of blocks that are impacted by this explosion.

Returns

void

Remarks

Updates a collection of blocks impacted by this explosion event.