相反于加载顺序卸载插件, close #1994

This commit is contained in:
Him188 2022-06-13 19:47:42 +01:00
parent 4408750847
commit 70c8255b6b
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375

View File

@ -78,9 +78,10 @@ internal class PluginManagerImpl(
init {
MiraiConsole.coroutineContext[Job]!!.invokeOnCompletion {
plugins.forEach { plugin ->
if (plugin.isEnabled)
plugins.asReversed().forEach { plugin ->
if (plugin.isEnabled) {
disablePlugin(plugin)
}
}
}
}