Material = luajava.bindClass("org.bukkit.Material")
--[[
Example GUI
]]
setTitle("Example Title")
setPermission("something.somethingelse")
canOpen(
function(who)
return true
end
)
--[[
The Menu size is dynamic, meaning it will generate based on where and how many buttons you have
but, if you want to set manually you can. This will override the dynamic sizing. So make sure
you give it enough rows.
Dynamic Menu size is not implemented yet. But is in working stages right now.
]]
setRows(1)
onOpen(
function(whoOpened)
-- doSomething
end
)
onClose(
function(whoClosed)
-- doSomething
end
)
local button = put(0, "Example Button") -- put(slot) || put(slot, name) || put(slot, name, lore[one line]) || create(name) || create(name, material) || create(material)
button.addClickEvent(
function(player)
-- doSomething
return true -- true closes menu, false keeps it open
end
)
button.setAmount(1)
-- button.setDamage(int) -- To change color of panes and shit
button.setMaterial(Material.REDSTONE)
button.setGlowing(true)
button.setName("Example Button")
button.setLore("Some Fucking Lore", "Line 2", "Line 3")
button.setSlot(0)
--[[
These can be used together or by themself, the result is the same.
if either is false the button will not show
]]
button.setViewPermission("player.canviewexample")
button.canView(
function(player)
return true
end
)