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

Extends

LevelEvent extends Event.

Members

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();