fix: Plugin Resources get error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-01-19 01:57:50 +08:00
parent 0b0cea9e50
commit 8933afeb71

View File

@ -15,6 +15,7 @@ public class MiaoScriptBungee extends Plugin {
@Override @Override
@SneakyThrows @SneakyThrows
public void onEnable() { public void onEnable() {
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
engine = new ScriptEngine(getDataFolder().getCanonicalPath(), getLogger(), this); engine = new ScriptEngine(getDataFolder().getCanonicalPath(), getLogger(), this);
engine.enableEngine(); engine.enableEngine();
} }