6.3 KiB
6.3 KiB
title
title |
---|
InventoryGUIPageBuilder - |
//KSpigot/net.axay.kspigot.inventory/InventoryGUIPageBuilder
InventoryGUIPageBuilder
[jvm] class InventoryGUIPageBuilder<T : ForInventory>(type: InventoryType<T>, page: Int)
Functions
Name | Summary |
---|---|
button | [jvm] Brief description A button is an item protected from any player actions. If clicked, the specified onClick function is invoked. Content fun button(slots: InventorySlotCompound<T>, itemStack: ItemStack, onClick: (InventoryGUIClickEvent<T>) -> Unit) |
changeGUI | [jvm] Brief description By pressing this button, the player switches to another InventoryGUI. The transition effect is applied. Content fun changeGUI(slots: InventorySlotCompound<T>, itemStack: ItemStack, newGUI: () -> InventoryGUI<*>, newPage: Int?, onChange: (InventoryGUIClickEvent<T>) -> Unit?) |
equals | [jvm] Content open operator override fun equals(other: Any?): Boolean |
freeSlot | [jvm] Brief description A free slot does not block any player actions. The player can put items in this slot or take items out of it. Content fun freeSlot(slots: InventorySlotCompound<T>) |
hashCode | [jvm] Content open override fun hashCode(): Int |
nextPage | [jvm] Brief description This button always tries to find the next page if clicked, and if a next page exists it is loaded. Content fun nextPage(slots: InventorySlotCompound<T>, itemStack: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit?) |
pageChanger | [jvm] Brief description This is a button which loads the specified toPage if clicked. Content fun pageChanger(slots: InventorySlotCompound<T>, itemStack: ItemStack, toPage: Int, onChange: (InventoryGUIClickEvent<T>) -> Unit?) |
placeholder | [jvm] Brief description An item protected from any player actions. This is not a button. Content fun placeholder(slots: InventorySlotCompound<T>, itemStack: ItemStack) |
previousPage | [jvm] Brief description This button always tries to find the previous page if clicked, and if a previous page exists it is loaded. Content fun previousPage(slots: InventorySlotCompound<T>, itemStack: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit?) |
toString | [jvm] Content open override fun toString(): String |
Properties
Name | Summary |
---|---|
page | [jvm] val page: Int |
transitionFrom | [jvm] var transitionFrom: PageChangeEffect? |
transitionTo | [jvm] var transitionTo: PageChangeEffect? |
type | [jvm] val type: InventoryType<T> |