CustomGUI

class CustomGUI(val title: Component, val size: Int, val type: InventoryType, val context: CustomGUI.() -> Unit)

Constructors

Link copied to clipboard
constructor(title: Component, size: Int, type: InventoryType, context: CustomGUI.() -> Unit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val size: Int
Link copied to clipboard
val title: Component
Link copied to clipboard
val type: InventoryType
Link copied to clipboard
lateinit var viewer: Player

Functions

Link copied to clipboard
fun onClick(action: InventoryClickEvent.() -> Unit)

Set the action to be executed when the player clicks on any slot while the GUI is open.

Link copied to clipboard
fun onClose(action: InventoryCloseEvent.() -> Unit)

Set the action to be executed when the inventory is closed

Link copied to clipboard
fun pattern(vararg pattern: String)
Link copied to clipboard
@JvmName(name = "setKey")
fun set(key: Char, item: ItemStack, action: InventoryClickEvent.() -> Unit = {})
@JvmName(name = "setSlot")
fun set(slot: Int, item: ItemStack, action: InventoryClickEvent.() -> Unit = {})
@JvmName(name = "setKeys")
fun set(keys: Collection<Char>, item: ItemStack, action: InventoryClickEvent.() -> Unit = {})
@JvmName(name = "setSlots")
fun set(indexes: Collection<Int>, item: ItemStack, action: InventoryClickEvent.() -> Unit = {})