returnable Handler
inline fun <T : ReturnableEvent<R>, R> IEventHandler.returnableHandler(noinline condition: () -> Boolean = { true }, ignoresCondition: Boolean = false, priority: Priority = Priority.NORMAL, timeout: Long? = null, noinline returnableHandler: (T) -> R)
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.