Open JusToastDEV opened 3 years ago
I'm not sure, but I think a null
just needs to be added to ScriptEngineManager
in ChatGames.java
, like change
private final ScriptEngineManager manager = new ScriptEngineManager();
to
private final ScriptEngineManager manager = new ScriptEngineManager(null);
import com.vk2gpz.jsengine.JSEngine; ... public class Foo { void bar() { ScriptEngine engine = JSEngine.getNewEngine(); try { engine.eval("your script"); } catch (javax.script.ScriptException ex) { ex.printStackTrace(); } ... }
code for adding JSEngine as a depend, as displayed on the plugin website
https://www.spigotmc.org/resources/jsengine.92709/ thanks ;)