diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/Subscribers.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/Subscribers.kt index 65c5dd0d1..c6ac0c2a1 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/Subscribers.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/event/Subscribers.kt @@ -64,10 +64,7 @@ fun KClass.subscribeAll(listeners: ListenerBuilder.() -> Unit) * 监听一个事件. 可同时进行多种方式的监听 * @see ListenerBuilder */ -inline fun subscribeAll(noinline listeners: ListenerBuilder.() -> Unit) { - ListenerBuilder { this.subscribeInternal(it) }.apply(listeners) -} - +inline fun subscribeAll(noinline listeners: ListenerBuilder.() -> Unit) = E::class.subscribeAll(listeners) /** * 监听构建器. 可同时进行多种方式的监听