handler
inline fun <T : Event> IEventHandler.handler(noinline condition: () -> Boolean = { true }, ignoresCondition: Boolean = false, priority: Priority = Priority.NORMAL, timeout: Long? = null, noinline handler: (T) -> Unit)
Registers an event handler for a specific event type.
Parameters
T
The type of event.
condition
An optional condition that must be met for the handler to be executed.
ignores Condition
Whether the condition should be ignored.
priority
The priority of the event hook.
timeout
An optional timeout for the event hook.
handler
The handler function for the event.
Throws
If the class does not implement IEventHandler.