The event is not cancelable.

The event does not have a result.

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.event.Event;

Name: cancel

Cancels the event. Same as setCanceled(true)

Return Type: void

ZenScript
Copy
// Event.cancel() as void

myEvent.cancel();

Link to g--1

Name: getResult

Return Type: EventResult

ZenScript
Copy
// Event.getResult() as EventResult

myEvent.getResult();

Link to g--2

Name: hasResult

Return Type: boolean

ZenScript
Copy
// Event.hasResult() as boolean

myEvent.hasResult();

Link to g--3

Name: isCancelable

Return Type: boolean

ZenScript
Copy
// Event.isCancelable() as boolean

myEvent.isCancelable();

Link to g--4

Name: isCanceled

Return Type: boolean

ZenScript
Copy
// Event.isCanceled() as boolean

myEvent.isCanceled();

Link to g--5

Name: setAllow

sets the event's result to allow

Return Type: void

ZenScript
Copy
// Event.setAllow() as void

myEvent.setAllow();

Link to g--6

Name: setCanceled

Return Type: void

ZenScript
Copy
Event.setCanceled(cancel as boolean) as void
ParameterTypeDescription
Parameter
cancel
Type
boolean
Description
No Description Provided

Link to g--7

Name: setDefault

sets the event's result to default

Return Type: void

ZenScript
Copy
// Event.setDefault() as void

myEvent.setDefault();

Name: setDeny

sets the event's result to deny

Return Type: void

ZenScript
Copy
// Event.setDeny() as void

myEvent.setDeny();

Link to g--9

Name: setResult

Return Type: void

ZenScript
Copy
Event.setResult(result as EventResult) as void
ParameterTypeDescription
Parameter
result
Type
EventResult
Description
No Description Provided
NameTypeHas GetterHas SetterDescription
Name
‚Äč
Type
Event
Has Getter
false
Has Setter
true
Description
No Description Provided
Name
cancelable
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
canceled
Type
boolean
Has Getter
true
Has Setter
true
Description
No Description Provided
Name
hasResult
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
result
Type
EventResult
Has Getter
true
Has Setter
false
Description
No Description Provided