From 5c6b4aa8ccabfbc78c5a7e42b96198208ec3ee37 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 12 Sep 2020 19:43:51 +0800 Subject: [PATCH] Rename JarPluginLoader to JvmPluginLoader. Rename JvmPluginLoader.Companion to JvmPluginLoader.BuiltIn --- .../net/mamoe/mirai/console/MiraiConsole.kt | 4 ++-- .../console/MiraiConsoleImplementation.kt | 4 ++-- .../mirai/console/data/PluginDataStorage.kt | 6 ++--- ...rImpl.kt => BuiltInJvmPluginLoaderImpl.kt} | 8 +++---- .../internal/plugin/JvmPluginInternal.kt | 6 ++--- .../internal/util/PluginServiceHelper.kt | 4 ++-- .../mirai/console/plugin/PluginLoader.kt | 22 +++++++++---------- .../console/plugin/jvm/AbstractJvmPlugin.kt | 2 +- .../mirai/console/plugin/jvm/JvmPlugin.kt | 2 +- ...{JarPluginLoader.kt => JvmPluginLoader.kt} | 18 +++++++-------- .../mirai/console/plugin/jvm/KotlinPlugin.kt | 2 +- .../mamoe/mirai/console/TestMiraiConosle.kt | 4 ++-- .../pure/MiraiConsoleImplementationPure.kt | 6 ++--- 13 files changed, 43 insertions(+), 45 deletions(-) rename backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/{JarPluginLoaderImpl.kt => BuiltInJvmPluginLoaderImpl.kt} (95%) rename backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/{JarPluginLoader.kt => JvmPluginLoader.kt} (62%) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt index 87cd2f6c8..f2e43d769 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsole.kt @@ -24,7 +24,7 @@ import net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge import net.mamoe.mirai.console.plugin.PluginLoader import net.mamoe.mirai.console.plugin.PluginManager import net.mamoe.mirai.console.plugin.center.PluginCenter -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import net.mamoe.mirai.console.util.ConsoleExperimentalApi import net.mamoe.mirai.console.util.ConsoleInternalApi import net.mamoe.mirai.console.util.CoroutineScopeUtils.childScopeContext @@ -64,7 +64,7 @@ public interface MiraiConsole : CoroutineScope { public val mainLogger: MiraiLogger /** - * 内建加载器列表, 一般需要包含 [JarPluginLoader]. + * 内建加载器列表, 一般需要包含 [JvmPluginLoader]. * * @return 不可变 [List] ([java.util.Collections.unmodifiableList]) */ diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt index d462676cc..eb4488e80 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/MiraiConsoleImplementation.kt @@ -19,7 +19,7 @@ import net.mamoe.mirai.console.command.ConsoleCommandSender import net.mamoe.mirai.console.data.PluginDataStorage import net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge import net.mamoe.mirai.console.plugin.PluginLoader -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import net.mamoe.mirai.console.util.ConsoleInput import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.utils.BotConfiguration @@ -72,7 +72,7 @@ public interface MiraiConsoleImplementation : CoroutineScope { public val frontEndDescription: MiraiConsoleFrontEndDescription /** - * 内建加载器列表, 一般需要包含 [JarPluginLoader]. + * 内建加载器列表, 一般需要包含 [JvmPluginLoader]. * * @return 不可变的 [List], [Collections.unmodifiableList] */ diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt index 05c10facf..2f1bb0ec1 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/data/PluginDataStorage.kt @@ -13,8 +13,8 @@ package net.mamoe.mirai.console.data import net.mamoe.mirai.console.internal.data.MemoryPluginDataStorageImpl import net.mamoe.mirai.console.internal.data.MultiFilePluginDataStorageImpl -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader import net.mamoe.mirai.console.plugin.jvm.JvmPlugin +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import net.mamoe.mirai.console.util.ConsoleExperimentalApi import java.io.File import java.nio.file.Path @@ -28,10 +28,10 @@ import java.nio.file.Path * * 此为较低层的 API, 一般插件开发者不会接触. * - * [JarPluginLoader] 实现一个 [PluginDataStorage], 用于管理所有 [JvmPlugin] 的 [PluginData] 实例. + * [JvmPluginLoader] 实现一个 [PluginDataStorage], 用于管理所有 [JvmPlugin] 的 [PluginData] 实例. * * @see PluginDataHolder - * @see JarPluginLoader.dataStorage + * @see JvmPluginLoader.dataStorage */ @ConsoleExperimentalApi public interface PluginDataStorage { diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JarPluginLoaderImpl.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt similarity index 95% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JarPluginLoaderImpl.kt rename to backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt index c1432d4a4..947d3a846 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JarPluginLoaderImpl.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/BuiltInJvmPluginLoaderImpl.kt @@ -26,18 +26,18 @@ import java.io.File import java.net.URLClassLoader import java.util.concurrent.ConcurrentHashMap -internal object JarPluginLoaderImpl : +internal object BuiltInJvmPluginLoaderImpl : AbstractFilePluginLoader(".jar"), CoroutineScope by MiraiConsole.childScope("JarPluginLoader", CoroutineExceptionHandler { _, throwable -> - JarPluginLoaderImpl.logger.error("Unhandled Jar plugin exception: ${throwable.message}", throwable) + BuiltInJvmPluginLoaderImpl.logger.error("Unhandled Jar plugin exception: ${throwable.message}", throwable) }), - JarPluginLoader { + JvmPluginLoader { override val configStorage: PluginDataStorage get() = MiraiConsoleImplementationBridge.configStorageForJarPluginLoader @JvmStatic - internal val logger: MiraiLogger = MiraiConsole.createLogger(JarPluginLoader::class.simpleName!!) + internal val logger: MiraiLogger = MiraiConsole.createLogger(JvmPluginLoader::class.simpleName!!) override val dataStorage: PluginDataStorage get() = MiraiConsoleImplementationBridge.dataStorageForJarPluginLoader diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt index 0000b2dd9..fdba5b38e 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/JvmPluginInternal.kt @@ -63,7 +63,7 @@ internal abstract class JvmPluginInternal( // region JvmPlugin final override val logger: MiraiLogger by lazy { - JarPluginLoaderImpl.logger.runCatchingLog { + BuiltInJvmPluginLoaderImpl.logger.runCatchingLog { MiraiConsole.createLogger( "Plugin ${this.description.name}" ) @@ -149,11 +149,11 @@ internal abstract class JvmPluginInternal( .plus( NamedSupervisorJob( "Plugin ${(this as AbstractJvmPlugin).dataHolderName}", - parentCoroutineContext[Job] ?: JarPluginLoaderImpl.coroutineContext[Job]!! + parentCoroutineContext[Job] ?: BuiltInJvmPluginLoaderImpl.coroutineContext[Job]!! ) ) .also { - JarPluginLoaderImpl.coroutineContext[Job]!!.invokeOnCompletion { + BuiltInJvmPluginLoaderImpl.coroutineContext[Job]!!.invokeOnCompletion { this.cancel() } } diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt index 0ba666f38..c3c0c68dc 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/util/PluginServiceHelper.kt @@ -11,7 +11,7 @@ package net.mamoe.mirai.console.internal.util import net.mamoe.mirai.console.internal.data.cast import net.mamoe.mirai.console.internal.data.createInstanceOrNull -import net.mamoe.mirai.console.internal.plugin.JarPluginLoaderImpl +import net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl import java.io.InputStream import java.lang.reflect.Modifier import java.util.* @@ -65,7 +65,7 @@ internal object PluginServiceHelper { fun loadAllServicesFromMemoryAndPluginClassLoaders(service: KClass): List { val list = ServiceLoader.load(service.java, this::class.java.classLoader).toList() - return list + JarPluginLoaderImpl.classLoaders.flatMap { it.findServices(service).loadAllServices() } + return list + BuiltInJvmPluginLoaderImpl.classLoaders.flatMap { it.findServices(service).loadAllServices() } } } diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginLoader.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginLoader.kt index 141cff9ad..5acc7ee43 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginLoader.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/PluginLoader.kt @@ -14,7 +14,7 @@ package net.mamoe.mirai.console.plugin import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.disable import net.mamoe.mirai.console.plugin.PluginManager.INSTANCE.enable import net.mamoe.mirai.console.plugin.description.PluginDescription -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import java.io.File import java.util.* @@ -26,7 +26,7 @@ import java.util.* * 有关插件的依赖和已加载的插件列表由 [PluginManager] 维护. * * ## 内建加载器 - * - [JarPluginLoader] Jar 插件加载器 + * - [JvmPluginLoader] Jar 插件加载器 * * ## 扩展加载器 * 插件被允许扩展一个加载器. @@ -34,7 +34,7 @@ import java.util.* * ### 实现扩展加载器 * 直接实现接口 [PluginLoader] 或 [FilePluginLoader], 并添加 [ServiceLoader] 相关资源文件即可. * - * @see JarPluginLoader Jar 插件加载器 + * @see JvmPluginLoader Jar 插件加载器 */ public interface PluginLoader

{ /** @@ -65,7 +65,7 @@ public interface PluginLoader

{ public val P.description: D // Java signature: `public D getDescription(P)` /** - * 加载一个插件 (实例), 但不 [启用][enable] 它. 返回加载成功的主类实例 + * 主动加载一个插件 (实例), 但不 [启用][enable] 它. 返回加载成功的主类实例 * * **实现细节**: 此函数只允许抛出 [PluginLoadException] 作为正常失败原因, 其他任意异常都属于意外错误. * 当异常发生时, 插件将会直接被放弃加载, 并影响依赖它的其他插件. @@ -76,7 +76,7 @@ public interface PluginLoader

{ public fun load(plugin: P) /** - * 启用这个插件. + * 主动启用这个插件. * * **实现细节**: 此函数可抛出 [PluginLoadException] 作为正常失败原因, 其他任意异常都属于意外错误. * 当异常发生时, 插件将会直接被放弃加载, 并影响依赖它的其他插件. @@ -89,7 +89,7 @@ public interface PluginLoader

{ public fun enable(plugin: P) /** - * 禁用这个插件. + * 主动禁用这个插件. * * **实现细节**: 此函数可抛出 [PluginLoadException] 作为正常失败原因, 其他任意异常都属于意外错误. * 当异常发生时, 插件将会直接被放弃加载, 并影响依赖它的其他插件. @@ -138,11 +138,11 @@ public open class PluginLoadException : RuntimeException { * ['/plugins'][PluginManager.pluginsPath] 目录中的插件的加载器. 每个加载器需绑定一个后缀. * * @see AbstractFilePluginLoader 默认基础实现 - * @see JarPluginLoader 内建的 Jar (JVM) 插件加载器. + * @see JvmPluginLoader 内建的 Jar (JVM) 插件加载器. */ public interface FilePluginLoader

: PluginLoader { /** - * 所支持的插件文件后缀, 含 '.'. 如 [JarPluginLoader] 为 ".jar" + * 所支持的插件文件后缀, 含 '.', 不区分大小写. 如 [JvmPluginLoader] 为 ".jar" */ public val fileSuffix: String } @@ -154,9 +154,9 @@ public interface FilePluginLoader

: PluginLoa */ public abstract class AbstractFilePluginLoader

( /** - * 所支持的插件文件后缀, 含 '.'. 如 [JarPluginLoader] 为 ".jar" + * 所支持的插件文件后缀, 含 '.', 不区分大小写. 如 [JvmPluginLoader] 为 ".jar" */ - public override val fileSuffix: String + public override val fileSuffix: String, ) : FilePluginLoader { private fun pluginsFilesSequence(): Sequence = PluginManager.pluginsFolder.listFiles().orEmpty().asSequence() @@ -173,7 +173,7 @@ public abstract class AbstractFilePluginLoader

( - initializer: () -> PluginLoader + initializer: () -> PluginLoader, ) : PluginLoader { private val instance by lazy(initializer) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt index 347f3be21..e52f03038 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin.kt @@ -35,7 +35,7 @@ public abstract class AbstractJvmPlugin @JvmOverloads constructor( public final override val dataHolderName: String get() = this.description.name - public final override val loader: JarPluginLoader get() = super.loader + public final override val loader: JvmPluginLoader get() = super.loader public final override fun permissionId(id: String): PermissionId = PermissionId(description.id, id) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt index ae303154a..c02f63864 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPlugin.kt @@ -48,7 +48,7 @@ public interface JvmPlugin : Plugin, CoroutineScope, /** 所属插件加载器实例 */ // `final` in AbstractJvmPlugin - public override val loader: JarPluginLoader get() = JarPluginLoader + public override val loader: JvmPluginLoader get() = JvmPluginLoader /** * 在插件被加载时调用. 只会被调用一次. diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JarPluginLoader.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt similarity index 62% rename from backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JarPluginLoader.kt rename to backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt index 160dbf5cc..1f4b90e33 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JarPluginLoader.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginLoader.kt @@ -11,30 +11,28 @@ package net.mamoe.mirai.console.plugin.jvm import kotlinx.coroutines.CoroutineScope import net.mamoe.mirai.console.data.PluginDataStorage -import net.mamoe.mirai.console.internal.plugin.JarPluginLoaderImpl +import net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl import net.mamoe.mirai.console.plugin.FilePluginLoader -import net.mamoe.mirai.console.util.ConsoleExperimentalApi /** * 内建的 Jar (JVM) 插件加载器 */ -@ConsoleExperimentalApi("classname might change") -public interface JarPluginLoader : CoroutineScope, FilePluginLoader { +public interface JvmPluginLoader : CoroutineScope, FilePluginLoader { + public override val fileSuffix: String get() = ".jar" + /** - * [JvmPlugin.reloadPluginData] 默认使用的实例 + * [AbstractJvmPlugin.reloadPluginData] 默认使用的实例 */ - @ConsoleExperimentalApi public val dataStorage: PluginDataStorage /** - * [JvmPlugin.reloadPluginData] 默认使用的实例 + * [AbstractJvmPlugin.reloadPluginData] 默认使用的实例 */ - @ConsoleExperimentalApi public val configStorage: PluginDataStorage - public companion object INSTANCE : JarPluginLoader by JarPluginLoaderImpl { + public companion object BuiltIn : JvmPluginLoader by BuiltInJvmPluginLoaderImpl { @Suppress("EXTENSION_SHADOWED_BY_MEMBER") override val JvmPlugin.description: JvmPluginDescription - get() = JarPluginLoaderImpl.run { description } + get() = BuiltInJvmPluginLoaderImpl.run { description } } } \ No newline at end of file diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt index 4fbf19f88..04a4ea380 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/KotlinPlugin.kt @@ -17,7 +17,7 @@ import kotlin.coroutines.EmptyCoroutineContext /** * Kotlin 插件的父类. * - * 必须通过 "plugin.yml" 指定主类并由 [JarPluginLoader] 加载. + * 必须通过 "plugin.yml" 指定主类并由 [JvmPluginLoader] 加载. */ public abstract class KotlinPlugin @JvmOverloads constructor( public final override val description: JvmPluginDescription, diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt index 68605851e..0ab21192b 100644 --- a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt +++ b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/TestMiraiConosle.kt @@ -17,7 +17,7 @@ import net.mamoe.mirai.console.data.MemoryPluginDataStorage import net.mamoe.mirai.console.data.PluginDataStorage import net.mamoe.mirai.console.plugin.DeferredPluginLoader import net.mamoe.mirai.console.plugin.PluginLoader -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import net.mamoe.mirai.console.util.ConsoleExperimentalApi import net.mamoe.mirai.console.util.ConsoleInput import net.mamoe.mirai.console.util.ConsoleInternalApi @@ -48,7 +48,7 @@ fun initTestEnvironment() { get() = Semver("1.0.0") } - override val builtInPluginLoaders: List> = listOf(DeferredPluginLoader { JarPluginLoader }) + override val builtInPluginLoaders: List> = listOf(DeferredPluginLoader { JvmPluginLoader }) override val consoleCommandSender: MiraiConsoleImplementation.ConsoleCommandSenderImpl = object : MiraiConsoleImplementation.ConsoleCommandSenderImpl { override suspend fun sendMessage(message: Message) { diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsoleImplementationPure.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsoleImplementationPure.kt index 97ca52f17..ebe903c6f 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsoleImplementationPure.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsoleImplementationPure.kt @@ -32,7 +32,7 @@ import net.mamoe.mirai.console.data.MultiFilePluginDataStorage import net.mamoe.mirai.console.data.PluginDataStorage import net.mamoe.mirai.console.plugin.DeferredPluginLoader import net.mamoe.mirai.console.plugin.PluginLoader -import net.mamoe.mirai.console.plugin.jvm.JarPluginLoader +import net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader import net.mamoe.mirai.console.pure.ConsoleInputImpl.requestInput import net.mamoe.mirai.console.util.ConsoleExperimentalApi import net.mamoe.mirai.console.util.ConsoleInput @@ -63,14 +63,14 @@ class MiraiConsoleImplementationPure @JvmOverloads constructor( override val rootPath: Path = Paths.get("."), override val builtInPluginLoaders: List> = Collections.unmodifiableList( - listOf(DeferredPluginLoader { JarPluginLoader }) + listOf(DeferredPluginLoader { JvmPluginLoader }) ), override val frontEndDescription: MiraiConsoleFrontEndDescription = ConsoleFrontEndDescImpl, override val consoleCommandSender: MiraiConsoleImplementation.ConsoleCommandSenderImpl = ConsoleCommandSenderImplPure, override val dataStorageForJarPluginLoader: PluginDataStorage = MultiFilePluginDataStorage(rootPath.resolve("data")), override val dataStorageForBuiltIns: PluginDataStorage = MultiFilePluginDataStorage(rootPath.resolve("data")), override val configStorageForJarPluginLoader: PluginDataStorage = MultiFilePluginDataStorage(rootPath.resolve("config")), - override val configStorageForBuiltIns: PluginDataStorage = MultiFilePluginDataStorage(rootPath.resolve("config")) + override val configStorageForBuiltIns: PluginDataStorage = MultiFilePluginDataStorage(rootPath.resolve("config")), ) : MiraiConsoleImplementation, CoroutineScope by CoroutineScope( NamedSupervisorJob("MiraiConsoleImplementationPure") + CoroutineExceptionHandler { coroutineContext, throwable ->