gui
Creates a simple GUI (Inventory) using a DSL.
Example usage:
val inventory = gui(Component.text("Simple GUI"), 3) {
slot(SLOT_2_5) {
icon(Material.APPLE)
onClick { player.sendMessage("Clicked!") }
}
}
player.openInventory(inventory)Content copied to clipboard
Return
A new Bukkit Inventory.
Parameters
title
The title of the GUI.
rows
The number of rows (1-6).
creator
The builder block.