LevelEvent

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.level.LevelEvent;

Extends

LevelEvent extends Event.

Members

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

Return Type: bool

cancelable() as bool
script.zs
// LevelEvent.cancelable() as bool;
myLevelEvent.cancelable();

Return Type: bool

Getter
script.zs
// LevelEvent.canceled as bool
myLevelEvent.canceled

Return Type: bool

Setter
script.zs
// LevelEvent.canceled = (cancel as bool);
myLevelEvent.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// LevelEvent.canceled() as bool;
myLevelEvent.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// LevelEvent.canceled(cancel as bool);
myLevelEvent.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// LevelEvent.hasResult as bool
myLevelEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// LevelEvent.hasResult() as bool;
myLevelEvent.hasResult();

Return Type: bool

Getter
script.zs
// LevelEvent.level as LevelAccessor
myLevelEvent.level

Return Type: LevelAccessor

Getter
script.zs
// LevelEvent.result as Result
myLevelEvent.result

Return Type: EventResult

Setter
script.zs
// LevelEvent.result = (result as Result);
myLevelEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// LevelEvent.result() as Result;
myLevelEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// LevelEvent.result(result as Result);
myLevelEvent.result(myResult);

Parameters:

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