Abstract Kt Inventory Paginated
abstract class AbstractKtInventoryPaginated<T : AbstractKtInventoryPaginated<T>>(plugin: Plugin, val line: Int) : KtInventoryBase
Base class for paginated inventories
Since
2.0.0
Parameters
T
Type of the paginated inventory
plugin
Plugin instance
line
Number of inventory rows
Inheritors
Types
Link copied to clipboard
abstract class Entry<T : AbstractKtInventoryPaginated<*>>(val paginated: T, val page: Int, val lastPage: Int) : AbstractKtInventory
Represents a single page of paginated inventory
Link copied to clipboard
abstract class Refreshable<T : AbstractKtInventoryPaginated<*>>(val clazz: KClass<T>) : RefreshableInventory<AbstractKtInventoryPaginated.Entry<T>>
Base class for refreshable paginated inventories
Properties
Functions
Link copied to clipboard
Adds an existing button to a single slot
Adds an existing button to multiple slots
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
fun button(vararg slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventory>) -> Unit = {})
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
Link copied to clipboard
fun createButton(itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventoryPaginated.Entry<T>>) -> Unit): KtInventoryButton<AbstractKtInventoryPaginated.Entry<T>>
Creates a new inventory button
Link copied to clipboard
fun nextPageButton(slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventoryPaginated.Entry<T>>) -> Unit = {})
Adds a button to navigate to the next page
Link copied to clipboard
Called when bottom inventory is clicked
Link copied to clipboard
Sets slots to be used for pagination
Link copied to clipboard
fun previousPageButton(slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventoryPaginated.Entry<T>>) -> Unit = {})
Adds a button to navigate to the previous page