returnable Handler
public static Unit returnableHandler<T extends ReturnableEvent<R>, R>(@NotNull() IEventHandler instance, Class<T> eventType, Supplier<Boolean> condition, boolean ignoresCondition, Priority priority, ReturnableHandler<T, R> handler, Long timeout)
Registers a handler for returnable events of type T.
Parameters
<T>
the type of the event to be handled
<R>
the type of the return value
instance
the event handler instance
condition
a supplier providing the condition to be checked
ignores Condition
whether the condition should be ignored
priority
the priority of the event handler
handler
the handler to process the event
timeout
the timeout for the event handler
Throws
if the listener is not registered
public static Unit returnableHandler<T extends ReturnableEvent<R>, R>(IEventHandler instance, Class<T> eventType, ReturnableHandler<T, R> handler)
Registers a handler for returnable events of type T with default settings.
Parameters
<T>
the type of the event to be handled
<R>
the type of the return value
instance
the event handler instance
handler
the handler to process the event