01-13-2015, 04:14 PM
function Initialize(Plugin) Plugin:SetName("JavaVM") Plugin:SetVersion(1) -- Hooks cPluginManager.AddHook(cPluginManager.HOOK_WORLD_STARTED, function(World) javavm = require("javavm") javavm.create("-Djava.class.path=jnlua-0.9.6.jar") System = java.require("java.lang.System") System.out:println("Hello, world!") javavm.destroy() return true end PLUGIN = Plugin -- NOTE: only needed if you want OnDisable() to use GetName() or something like that -- Command Bindings LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion()) return true end function OnDisable() LOG(PLUGIN:GetName() .. " is shutting down...") end