handler
public final static Unit handler<T extends Event>(IEventHandler $self, Function0<Boolean> condition, Boolean ignoresCondition, Priority priority, Long timeout, Function1<T, Unit> handler)
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.