Invalid leaf directive! `since`

Represents a phase in which an event is fired and can be listened to.

Various events might have different meanings for phases, so do check the documentation. Usually, you want to use the NORMAL phase (which is specified for you automatically) to catch events occurring in the default phase.

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.events.EventPhase;

EventPhase is an enum. It has 3 enum constants. They are accessible using the code below.

ZenScript
Copy
<constant:eventphase:earliest>
<constant:eventphase:normal>
<constant:eventphase:latest>