Handler Util
Functions
Link copied to clipboard
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.
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.
Link copied to clipboard
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.
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.