Sueta

JSEngine

3.3.5

Wrapper for Nashorn JavaScript engine

·Script
  1. 3.3.5latestincludes 1.21.10 support.Oct 14, 2025
    includes 1.21.10 support
    34 downloads
  2. 3.3.4made java 8 compatibleOct 4, 2024
    made java 8 compatible
    1558 downloads
  3. 3.3.0re-built with 1.20.2Oct 17, 2023
    just recompiled with 1.20.2.
    1730 downloads
  4. 3.2.2built with 1.19.4May 14, 2023
    built with 1.19.4
    877 downloads
  5. 3.2.1changed the plugin name back to JSEngineFeb 27, 2023
    changed the plugin name back to JSEngine
    497 downloads
  6. 3.2.0including 1.19.3 support.Feb 27, 2023
    including 1.19.3 support.
    3 downloads
  7. 3.1.1built with 1.18.1Dec 23, 2021
    built with 1.18.1
    1898 downloads
  8. 3.1.0built with 1.18Dec 3, 2021
    Built against Spigot 1.18
    158 downloads
  9. 3.0.4built against 1.17Jun 15, 2021
    built against 1.17
    271 downloads
  10. 3.0.3added ForceNashorn: optionMay 29, 2021
    Code (Text): # if this option is true, even if ScriptEngineManager already has a factory # for JavaScript, this plugin will try to replace it with openjdk nashorn. ForceNashorn: false If this option is set to "true", you won't see the warning message from your java about Nashorn is going to be removed in the future java.
    41 downloads
  11. 3.0.2added a sanity check to see whether the JavaScript engine exist or not.May 29, 2021
    added a sanity check to see whether the JavaScript engine exists or not.
    26 downloads
  12. 3.0.1change the order of initialisation.May 27, 2021
    change the order of initialisation.
    1 download
  13. 3.0.0supports different ways to access the engine.May 27, 2021
    You can access JS engine in three different ways; 1) use JSEngine.jar as a library Code (Text): 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(); } ... } 2) use JSEngine as a plugin Code (Text): Plugin plugin = Bukkit.getPluginManager().getPlugin("JSEngine"); if (plugin != null) { engine = (ScriptEngine) ((JSEngine) plugin).getSharedEngine(); //engine = (ScriptEngine) ((JSEngine) plugin).getNewEngine(); } ... if (engine != null) { try { engine.eval("...you script"); } catch (javax.script.ScriptException ex) { ex.printStackTrace(); } } 3) use JSEngine through Bukkit's ServicesManager Code (Text): ServicesManager servicesManager = Bukkit.getServer().getServicesManager().getRegistration(ScriptEngineManager.class); ScriptEngineManager scriptEngineManager = servicesManager.getProvider(); ScriptEngine engine = scriptEngineManager.getEngineByName("js"); try { engine.eval("your script"); } catch (javax.script.ScriptException ex) { ex.printStackTrace(); }
    1 download
  14. 2.0.2included license files for openjdk, ow2 resources.May 26, 2021
    included license files for openjdk, ow2 resources.
    3 downloads
  15. 2.0.1added the missing classes.May 26, 2021
    added the missing classes.
    4 downloads
  16. 2.0.0getSharedEngine, getNewEngine have been added.May 26, 2021
    getSharedEngine will return a shared (static) engine, getNewEngine will return a new instance.
    1 download
  17. 1.0.0May 26, 2021
    2 downloads

Similar projects

Script →