button
fun button(vararg slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventory>) -> Unit = {})
Adds a button to multiple slots with the given item and click handler
Since
2.0.0
Parameters
slot
Slot numbers to place the button
item Stack
Item to display
on Click
Click event handler
fun button(slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventory>) -> Unit = {})
Adds a button to a single slot with the given item and click handler
Since
2.0.0
Parameters
slot
Slot number to place the button
item Stack
Item to display
on Click
Click event handler
fun button(slots: Iterable<Int>, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventory>) -> Unit = {})
Adds a button to multiple slots with the given item and click handler
Since
2.0.0
Parameters
slots
Slot numbers to place the button
item Stack
Item to display
on Click
Click event handler
Adds an existing button to a single slot
Since
2.0.0
Parameters
slot
Slot number to place the button
item
Button to add
Throws
if slot is not between 0 and size
Adds an existing button to multiple slots
Since
2.0.0
Parameters
slot
Slot numbers to place the button
item
Button to add
Adds an existing button to multiple slots
Since
2.0.0
Parameters
slots
Slot numbers to place the button
item
Button to add