The event is not cancelable.

The event does not have a result.

Importare la Classe

Link to importare-la-classe

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

Name: getResult

Return Type: EventResult

ZenScript
Copy
// Event.getResult() as EventResult

myEvent.getResult();

Name: hasResult

Return Type: boolean

ZenScript
Copy
// Event.hasResult() as boolean

myEvent.hasResult();

Name: isCancelable

Return Type: boolean

ZenScript
Copy
// Event.isCancelable() as boolean

myEvent.isCancelable();

Name: isCanceled

Return Type: boolean

ZenScript
Copy
// Event.isCanceled() as boolean

myEvent.isCanceled();

Name: setAllow

sets the event's result to allow

Return Type: void

ZenScript
Copy
// Event.setAllow() as void

myEvent.setAllow();

Name: setCanceled

Return Type: void

ZenScript
Copy
Event.setCanceled(cancel as boolean) as void
ParametroTipoDescrizione
Parametro
cancel
Tipo
boolean
Descrizione
No Description Provided

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

Name: setResult

Return Type: void

ZenScript
Copy
Event.setResult(result as EventResult) as void
ParametroTipoDescrizione
Parametro
result
Tipo
EventResult
Descrizione
No Description Provided
NomeTipoHa GetterHa SetterDescrizione
Nome
Tipo
Event
Ha Getter
no
Ha Setter
Descrizione
No Description Provided
Nome
cancelable
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
canceled
Tipo
boolean
Ha Getter
Ha Setter
Descrizione
No Description Provided
Nome
hasResult
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
result
Tipo
EventResult
Ha Getter
Ha Setter
no
Descrizione
No Description Provided