ICancellableEvent

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

Members

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// ICancellableEvent.cancel();
myICancellableEvent.cancel();
Getter
script.zs
// ICancellableEvent.canceled as bool
myICancellableEvent.canceled

Return Type: bool

Setter
script.zs
// ICancellableEvent.canceled = (cancel as bool);
myICancellableEvent.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// ICancellableEvent.canceled() as bool;
myICancellableEvent.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// ICancellableEvent.canceled(cancel as bool);
myICancellableEvent.canceled(myBool);

Parameters:

cancel Type: bool