Closed cssxsh closed 2 years ago
https://github.com/MeowCat-Studio/mirai-message-source/blob/849e39ed84ee4853f0ff636197235ab39bd7e805/src/main/kotlin/Plugin.kt#L37-L41
val oc = Thread.currentThread().contextClassLoader try { Thread.currentThread().contextClassLoader = jvmPluginClasspath.pluginClassLoader ImageIO.scanForPlugins() NativeDB.LIBRARY.load() } finally { Thread.currentThread().contextClassLoader = oc }
因为在此处修改contextClassloader会影响onEnable的调用者是么? 有道理
https://github.com/MeowCat-Studio/mirai-message-source/blob/849e39ed84ee4853f0ff636197235ab39bd7e805/src/main/kotlin/Plugin.kt#L37-L41