MineLua 2 is the new update for MineLua. MineLua is a java based plugin there allows you coding in lua, this means you simply can create lua scripts and run them on your server. The plugin has some features as custom api and encryption there gives you extra abilities.
The plugin is based on LuaJ 3.0.1 which is a java to lua / lua to java converter,
That means do you make an addon is it a good thing to know little about LuaJ's api
LuaJ Homepage
Source code
Default Settings:
- Script folder: ./plugins/MineLua/scripts/
- Encrypted files folder: ./plugins/MineLua/encrypted/
- Auto encryption status: false
- File extension: .lua
- Encrypted extension: .clua
- Auto load scripts: true
You can use the bukkit javadocs: Bukkit Javadocs
function onEnable(plugin)
--Plugin Infomation
plugin:setName("MineExample")
plugin:setVersion("1.0.1")
plugin:setDescription("This is a example plugin")
end
function onDisable(plugin)
--Disable code here....
end
function onEnable(plugin)
--Plugin Infomation
plugin:setName("MineExample")
plugin:setVersion("1.0.1")
plugin:setDescription("This is a example plugin")
--Hook event
plugin:hookEvent("PlayerJoinEvent", onjoin)
end
function onJoin(event)
event:setJoinMessage(nil)
local player = event:getPlayer()
broadcast("§4" .. player:getName() .. " §chas joined the game!")
end
function onEnable(plugin)
--Plugin Infomation
plugin:setName("MineExample")
plugin:setVersion("1.0.1")
plugin:setDescription("This is a example plugin")
--Make a command
plugin:bindCommand("test", command)
end
function command(player, args)
broadcast("Command executed by " .. player:getName())
player:sendMessage("Arg 1 of command is: " .. args[1])
end
function onEnable(plugin)
--Plugin Infomation
plugin:setName("MineExample")
plugin:setVersion("1.0.1")
plugin:setDescription("This is a example plugin")
--Hook event
plugin:hookEvent("TabCompleteEvent", tabComplete)
--Make a command
plugin:bindCommand("test", command)
end
function command(player, args)
broadcast("Command executed by " .. player:getName())
player:sendMessage("Arg 1 of command is: " .. args[1])
end
function onTabComplete(event)
if event:getCommand():getName() == "test" then
local List = luajava.new(luajava.bindClass("java.util.ArrayList"))
List:add("help1")
List:add("help2")
List:add("help3")
List:add("help4")
event:setResult(List)
end
end