NashornJs - Provider and CLI 1.1.3

Makes the NashornJS Engine available for Servers on Java 15 and above

  1. Eldoria
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    • 1.17
    Source Code:
    https://github.com/eldoriarpg/NashornJS
    Contributors:
    OpenJDK, Hadde
    OwO What is dis?
    Some Minecraft Plugins out there used the Nashorn JS Engine in the past to evaluate some stuff.
    This Engine was removed in Java 15, which caused some problems for these plugins.

    The NashornJS Plugin provides a ScriptEngineManager to create new script engines.

    How does it work?
    NashornJS registers a ScriptEngineManager as a service on load.
    You can use this service to retrieve your own nashorn engine instance.
    Code (Java):
        var reg = Bukkit.getServer().getServicesManager().getRegistration(ScriptEngineManager.class);
        var managerChan = reg.getProvider();
        var nashornChan = managerChan.getEngineByName("nashorn");
    That's all. Now you can use your nashorn instance like you always did.

    You won't need any external dependency for this way, which was a main point for this implementation.
    You may want to add NashornJs as a Softdepend in your plugin.yml

    Of course there may be a better way, but the Bukkit Classloader is fucking around with everything, so I will stick with this easy any reliable way.
    If you know a better way please contribute to the git repository.

    What is this cli thingy OwO?
    This plugin has also a small cli to use javascript on your server.
    It is disabled by default for obvious reasons.
    JS in the wrong hands, and the trouble can start.

    You can use the cli with the /js or /nashorn command.
    Write a \ at the end to add another line.

    Every player can have its own engine instance.

    You will need the nashorn.eval permission to access the cli.

Recent Updates

  1. Fix for Java 17
  2. Its me again
  3. Proper project setup

Recent Reviews

  1. Fabb_Ex3
    Fabb_Ex3
    5/5,
    Version: 1.1.2
    owo thx thats it!!!!!ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ
  2. wysohn
    wysohn
    5/5,
    Version: 1.1.2
    I'm giving 5 stars because it deserves 5 stars. Yes, reviews are very important to plugin developers.
  3. Faruq_
    Faruq_
    4/5,
    Version: 1.1.2
    Ahhh, i want to use it for my server cuz your plugin "BigDoorsOpener" say "Java 16 detected!", and suggested me to use an alternative engine

    But I have a question, is it support 1.17?
    1. Eldoria
      Author's Response
      The review Section is not for asking Questions. Please use the Discussion for this. Also dont know why you give 4 Stars without any reason. Reviews are extremely important for us plugin developers.

      But yes it does support 1.17