wait Matches
suspend fun <T : Event> EventListener.waitMatches(eventClass: Class<T>, priority: Short, predicate: Predicate<T>): T
inline suspend fun <T : Event> EventListener.waitMatches(priority: Short = 0, predicate: Predicate<T>): T
Wait an event of type T which matches given predicate.
The continuation resumes on the event handler thread. For example:
net.ccbluex.liquidbounce.event.events.PacketEvent: client Netty IO (EventLoopGroup)
net.ccbluex.liquidbounce.event.events.GameTickEvent: client render thread
Parameters
priority
The priority of the event hook.
predicate
The predicate to match the event. If it throws a Throwable, the continuation will be resumed with Result.failure.