listen

fun <E : Event> listen(clazz: Class<E>, priority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = false, action: ListenerAction<E>): FlyLibBuilder<T>

Listens to the specified event with the specified priority. The event Listen is registered when the calling plugin is enabled, not when this method is called, and is unregistered when the calling plugin is disabled.