Home Commands Examples Getting Started With Scripts Global Keywords
BracketHandlers ForgeBracketDumpers ForgeBracketValidators

ExplosionEvent

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.forge.api.event.ExplosionEvent;

Extends

ExplosionEvent extends Event.

Members

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// ExplosionEvent.cancel();
myExplosionEvent.cancel();
Getter
script.zs
// ExplosionEvent.cancelable as bool
myExplosionEvent.cancelable

Return Type: bool

cancelable() as bool
script.zs
// ExplosionEvent.cancelable() as bool;
myExplosionEvent.cancelable();

Return Type: bool

Getter
script.zs
// ExplosionEvent.canceled as bool
myExplosionEvent.canceled

Return Type: bool

Setter
script.zs
// ExplosionEvent.canceled = (cancel as bool);
myExplosionEvent.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// ExplosionEvent.canceled() as bool;
myExplosionEvent.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// ExplosionEvent.canceled(cancel as bool);
myExplosionEvent.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// ExplosionEvent.explosion as Explosion
myExplosionEvent.explosion

Return Type: Explosion

Getter
script.zs
// ExplosionEvent.hasResult as bool
myExplosionEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// ExplosionEvent.hasResult() as bool;
myExplosionEvent.hasResult();

Return Type: bool

Getter
script.zs
// ExplosionEvent.level as Level
myExplosionEvent.level

Return Type: Level

Getter
script.zs
// ExplosionEvent.result as Result
myExplosionEvent.result

Return Type: EventResult

Setter
script.zs
// ExplosionEvent.result = (result as Result);
myExplosionEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// ExplosionEvent.result() as Result;
myExplosionEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// ExplosionEvent.result(result as Result);
myExplosionEvent.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// ExplosionEvent.setAllow();
myExplosionEvent.setAllow();
setDefault()
sets the event's result to default
script.zs
// ExplosionEvent.setDefault();
myExplosionEvent.setDefault();
setDeny()
sets the event's result to deny
script.zs
// ExplosionEvent.setDeny();
myExplosionEvent.setDeny();