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
pluginClassloader

默认通过 CallerFinder.getCaller 获取调用方 StackFrame 然后获取其 Class.getClassLoader.