mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-22 13:46:13 +08:00
PluginManager: do not clear plugin seq when reloading
This commit is contained in:
parent
2246d906c6
commit
7769183f02
@ -159,7 +159,7 @@ object PluginManager {
|
||||
/**
|
||||
* 尝试加载全部插件
|
||||
*/
|
||||
fun loadPlugins() {
|
||||
fun loadPlugins(clear: Boolean = true) {
|
||||
logger.info("""开始加载${pluginsPath}下的插件""")
|
||||
val findPluginsResult = findPlugins()
|
||||
val pluginsFound = findPluginsResult.pluginsFound
|
||||
@ -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