handler

open fun <T : Event?> handler(@NotNull instance: IEventHandler, eventType: Class<T>, condition: Supplier<Boolean>, ignoresCondition: Boolean, priority: Priority, handler: Handler<T>, timeout: Long)

Registers a handler for events of type T.

Parameters

<T>

the type of the event to be handled

instance

the event handler instance

eventType

the class type of the event

condition

a supplier providing the condition to be checked

ignoresCondition

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


open fun <T : Event?> handler(@NotNull instance: IEventHandler, eventType: Class<T>, handler: Handler<T>)

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