handler
public static Unit handler<T extends Event>(@NotNull() IEventHandler instance, Class<T> eventType, Supplier<Boolean> condition, boolean ignoresCondition, Priority priority, Handler<T> handler, Long timeout)
Registers a handler for events of type T.
Parameters
<T>
the type of the event to be handled
instance
the event handler instance
event Type
the class type of the event
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 handler<T extends Event>(@NotNull() IEventHandler instance, Class<T> eventType, Handler<T> handler)
Registers a handler for events of type T with default settings.
Parameters
<T>
the type of the event to be handled
instance
the event handler instance
handler
the handler to process the event