Home Commands Examples Getting Started With Scripts Global Keywords
NeoForgeBracketDumpers NeoForgeBracketHandlers NeoForgeBracketValidators

Event

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.Event;

Members

Getter
script.zs
// Event.hasResult as bool
myEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// Event.hasResult() as bool;
myEvent.hasResult();

Return Type: bool

Getter
script.zs
// Event.result as Result
myEvent.result

Return Type: EventResult

Setter
script.zs
// Event.result = (result as Result);
myEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// Event.result() as Result;
myEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// Event.result(result as Result);
myEvent.result(myResult);

Parameters:

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