pure format

+
console plugin auto disable
This commit is contained in:
jiahua.liu 2020-03-08 23:01:52 +08:00
parent 4903c87034
commit 0ebe200774

View File

@ -153,6 +153,7 @@ object PluginManager {
//real load //real load
logger.info("loading plugin " + description.name) logger.info("loading plugin " + description.name)
lastPluginName = description.name
try { try {
val pluginClass = try { val pluginClass = try {
@ -170,7 +171,6 @@ object PluginManager {
.loadClass("${description.basePath}Kt") .loadClass("${description.basePath}Kt")
} }
return try { return try {
lastPluginName = description.name
val subClass = pluginClass.asSubclass(PluginBase::class.java) val subClass = pluginClass.asSubclass(PluginBase::class.java)
val plugin: PluginBase = val plugin: PluginBase =
subClass.kotlin.objectInstance ?: subClass.getDeclaredConstructor().newInstance() subClass.kotlin.objectInstance ?: subClass.getDeclaredConstructor().newInstance()