Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ public IsolatedClassLoader(URL[] urls, ClassLoader parent) {
excludedClasses.add("taboolib.common.ClassAppender$Callback");

// 其他插件访问
excludedClasses.add("taboolib.common.OpenAPI");
excludedClasses.add("taboolib.common.platform.Plugin");
excludedClasses.add("taboolib.common.OpenAPI");
excludedClasses.add("taboolib.common.OpenListener");
excludedClasses.add("taboolib.common.OpenResult");

// 交叉访问
excludedClasses.add("taboolib.common.LifeCycle");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package taboolib.platform.type

import org.bukkit.plugin.Plugin
import org.tabooproject.reflex.Reflex.Companion.invokeLocalMethod
import org.tabooproject.reflex.Reflex.Companion.invokeMethod
import taboolib.common.OpenContainer
import taboolib.common.OpenResult
import taboolib.common.io.groupId
import taboolib.common.io.isDebugMode
import taboolib.common.io.taboolibId

/**
Expand All @@ -22,8 +20,8 @@ class BukkitContainer(val plugin: Plugin) : OpenContainer {
private val api = try {
Class.forName("${plugin::class.java.groupId}.${taboolibId}.common.OpenAPI")
} catch (ex: ClassNotFoundException) {
// 在调试模式下输出错误信息
if (isDebugMode) ex.printStackTrace()
// 总是输出错误信息
ex.printStackTrace()
null
}

Expand All @@ -39,7 +37,8 @@ class BukkitContainer(val plugin: Plugin) : OpenContainer {
return try {
OpenResult.cast(api?.invokeMethod<Any>("call", name, args, isStatic = true, remap = false) ?: error("OpenAPI not found in ${getName()}"))
} catch (ex: NoSuchMethodException) {
if (isDebugMode) ex.printStackTrace()
// 总是输出错误信息
ex.printStackTrace()
OpenResult.failed()
}
}
Expand Down
Loading