diff --git a/buildSrc/src/main/kotlin/versions.kt b/buildSrc/src/main/kotlin/versions.kt index ed00681bb..91670118b 100644 --- a/buildSrc/src/main/kotlin/versions.kt +++ b/buildSrc/src/main/kotlin/versions.kt @@ -12,7 +12,7 @@ import org.gradle.kotlin.dsl.DependencyHandlerScope object Versions { object Mirai { const val core = "0.37.1" - const val console = "0.4.8" + const val console = "0.4.9" const val consoleGraphical = "0.0.7" const val consoleWrapper = "0.2.0" } diff --git a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugins/PluginManager.kt b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugins/PluginManager.kt index e4e4a639e..520cf8413 100644 --- a/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugins/PluginManager.kt +++ b/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugins/PluginManager.kt @@ -159,13 +159,13 @@ object PluginManager { /** * 尝试加载全部插件 */ - fun loadPlugins() { + fun loadPlugins(clear: Boolean = true) { logger.info("""开始加载${pluginsPath}下的插件""") val findPluginsResult = findPlugins() val pluginsFound = findPluginsResult.pluginsFound val pluginsLocation = findPluginsResult.pluginsLocation - //不仅要解决A->B->C->A, 还要解决A->B->C->A + //不仅要解决A->B->C->A, 还要解决A->B->A->A fun checkNoCircularDepends( target: PluginDescription, needDepends: List, @@ -249,8 +249,10 @@ object PluginManager { } - //清掉优先级队列, 来重新填充 - pluginsSequence.clear() + if (clear) { + //清掉优先级队列, 来重新填充 + pluginsSequence.clear() + } pluginsFound.values.forEach { try { @@ -341,7 +343,7 @@ object PluginManager { disablePlugin(it) } } - loadPlugins() + loadPlugins(false) }