CTEventManager
The event Manager is your go-to point if you want to register custom event handlers.
You can register EventHandlers for everything that derives from Event. Make sure to tell ZC of the type you are using, so that you can access the event’s properties.
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.
Static Methods
Registers a new Event listener.
Parameter | Type | Description |
---|---|---|
Parameter consumer | Type Consumer<T> | Description The event handler as consumer |
Parameter T | Type Event | Description The type of the event |
Registers a new Event listener with a specific priority.
Parameter | Type | Description |
---|---|---|
Parameter priority | Type EventPriority | Description priority for this listener |
Parameter consumer | Type Consumer<T> | Description The event handler as consumer |
Parameter T | Type Event | Description The type of the event |