mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
59ebefb272
@ -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"
|
||||
}
|
||||
|
@ -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<String>,
|
||||
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user