Class LuaLoader
java.lang.Object
games.stendhal.server.core.scripting.lua.LuaLoader
Manages scripts written in Lua.
-
Method Summary
Modifier and TypeMethodDescriptioncreateScript(String filename) Create new script instance.static LuaLoaderget()Retrieves the singleton instance.org.luaj.vm2.GlobalsRetrieves Lua global objects.voidonLoadScript(LuaScript script) Action when a new script is being loaded.voidonUnloadScript(LuaScript script) Action when a script has finished executing.
-
Method Details
-
get
Retrieves the singleton instance. -
createScript
Create new script instance.- Parameters:
filename- Path to Lua script.- Returns:
- Loadable script representation.
-
getGlobals
public org.luaj.vm2.Globals getGlobals()Retrieves Lua global objects. -
onLoadScript
Action when a new script is being loaded. -
onUnloadScript
Action when a script has finished executing.
-