chore: Bump LuaJava version
- Improve "no matching method" errors (
ab76f3624cf1b892a2d0e2625d1a5a35826e9847)
chore: Cleanup scriptmanager.lua
chore: Improve script sandboxing by making standard Lua functions read-only
lua: Add a synchronized function
This works similar to Java's synchronized keyword and uses it under the hood. You should use this if you are gonna be doing any operations off of the main thread to avoid JVM crashes.
Fix partial loads when a script errors on load.
Fix /lualink reload|unload erroring on scripts that aren't already loaded.
Update src/main/resources/lua/scriptmanager.lua
Co-authored-by: Copilot 175728472+Copilot@users.noreply.github.com
Test
Merge pull request #21 from LuaLink/fix-load-errors
Fix partial loads when a script errors on load.
Allow selecting between LuaJIT and Lua5.4
With this version it introduces a config.json with a luaRuntime field. By default this is set to LUAJIT which means scripts will be ran under the LUAJIT runtime. Another supported runtime is Lua 5.4 which can be used by setting that field to LUA54.
LuaJIT does require libgcc to be present, otherwise an UnsatisfiedLinkError will be thrown however with this version if that occurs it will try and fallback to Lua 5.4 which doesn't seem to require it.


