returnable Handler
public final static Unit returnableHandler<T extends ReturnableEvent<R>, R extends Any>(IEventHandler $self, Function0<Boolean> condition, Boolean ignoresCondition, Priority priority, Long timeout, Function1<T, R> returnableHandler)
Registers a returnable event handler for a specific event type.
Parameters
T
The type of event.
R
The type of the result returned by the handler.
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.