LuaEngineNK

Experimental LuaEngineNK 1.1.0

Compatible API Versions
1.0.0 and higher
Contributors
Creadores Program
Requirements:
JSEngineNK Plugin: https://cloudburstmc.org/resources/jsenginenk.939/
JSENK2 Plugin: https://cloudburstmc.org/resources/jsenk2.1017/
Know Basic JavaScript
Installation:
Easily installed with a JSEngineNK script
JavaScript:
const LuaSc = require("LuaEngineNK/org/CreadoresProgram/LuaEngineNK.js");
Engine Creation:
Just add this code to your script and you can use Lua!
JavaScript:
var TestLua = new LuaSc.LuaEngineNK().build();
Eval:
JavaScript:
TestLua.eval("print('hello world!')");
Default variables:

getLogger return logger by JSEngineNK
getServer return server
manager return manager by JSEngineNK
plugin return main Class by JSEngineNK
Specify Variables (put):
JavaScript:
TestLua.put("Variable", objectJava);

//also applies to setNnClassLoader!
setNnClassLoader:
This function does the same thing as JSEngineNK's Nnclassloader API but passed to Lua example:
JavaScript:
TestLua.setNnClassLoader({ urls: ["https://test.com/test.jar"] }, {

  variable: "class.example"//...

});
It also has most of the features of PHPEngineNK (minus code conversion and print)
evalFile:
Run Lua code from a file:
JavaScript:
TestLua.evalFile(manager.getFile("TestLua", "Test.lua"));
More Info: https://github.com/luaj/luaj
Author
Trollhunters501
Downloads
369
Views
620
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Trollhunters501

Latest updates

  1. Update API

    Update to JSENK2
  2. JSdelivr Update

    Now the plugin is in JSdelivr!(See description)
Top