handle

fun handle(action: T.() -> Unit): EventBuilder<T>

Defines the action to be performed when the event is handled. Calling this method will register the listener.

Parameters

action

The action block.