loadFromResource
fun loadFromResource(filename: String = "plugin.yml", pluginClassloader: ClassLoader = CallerFinder.getCaller()?.findLoader()
?: error("Cannot find caller classloader, please specify manually.")): JvmPluginDescription
从 pluginClassloader 读取资源文件 filename 并以 YAML 格式解析为 SimpleJvmPluginDescription
Parameters
filename
ClassLoader.getResourceAsStream 的参数 name
pluginClassloader
默认通过 CallerFinder.getCaller 获取调用方 StackFrame 然后获取其 Class.getClassLoader.