Commit c09d44f4 authored by Him188's avatar Him188

Fix subscribeAll

parent d59c7165
......@@ -64,10 +64,7 @@ fun <E : Event> KClass<E>.subscribeAll(listeners: ListenerBuilder<E>.() -> Unit)
* 监听一个事件. 可同时进行多种方式的监听
* @see ListenerBuilder
*/
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) {
ListenerBuilder<E> { this.subscribeInternal(it) }.apply(listeners)
}
inline fun <reified E : Event> subscribeAll(noinline listeners: ListenerBuilder<E>.() -> Unit) = E::class.subscribeAll(listeners)
/**
* 监听构建器. 可同时进行多种方式的监听
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment