mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-28 16:50:09 +08:00
Fix Plugin repeated disable
This commit is contained in:
parent
bc290f63bb
commit
9db8c88aa8
@ -71,7 +71,10 @@ internal object PluginManagerImpl : PluginManager, CoroutineScope by MiraiConsol
|
||||
|
||||
init {
|
||||
MiraiConsole.coroutineContext[Job]!!.invokeOnCompletion {
|
||||
plugins.forEach { disablePlugin(it) }
|
||||
plugins.forEach { plugin ->
|
||||
if (plugin.isEnabled)
|
||||
disablePlugin(plugin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user