mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 22:00:10 +08:00
PluginManager: remove hot reload
This commit is contained in:
parent
59ebefb272
commit
1e2b85b737
@ -66,13 +66,6 @@ abstract class PluginBase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 当Console reload时被调用
|
||||
*/
|
||||
open fun onReload(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* 当任意指令被使用时调用.
|
||||
*
|
||||
@ -150,18 +143,8 @@ abstract class PluginBase
|
||||
}
|
||||
}
|
||||
|
||||
internal fun reload(): Boolean {
|
||||
try {
|
||||
return onReload()
|
||||
} catch (e: Exception) {
|
||||
logger.error(e)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
internal var pluginName: String = ""
|
||||
|
||||
|
||||
/**
|
||||
* Java API Scheduler
|
||||
*/
|
||||
|
@ -339,9 +339,7 @@ object PluginManager {
|
||||
|
||||
fun reloadPlugins() {
|
||||
pluginsSequence.forEach {
|
||||
if (it.reload()) {
|
||||
disablePlugin(it)
|
||||
}
|
||||
it.disable()
|
||||
}
|
||||
loadPlugins(false)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user