Kt Inventory Paginated Adventure
abstract class KtInventoryPaginatedAdventure(plugin: Plugin, line: Int) : AbstractKtInventoryPaginated<KtInventoryPaginatedAdventure>
Abstract class for paginated inventories with Adventure Component titles.
Since
2.0.0
Parameters
plugin
The plugin instance
line
Number of inventory lines (1-6)
Types
Link copied to clipboard
class Entry<T : KtInventoryPaginatedAdventure>(paginated: T, page: Int, lastPage: Int) : AbstractKtInventoryPaginated.Entry<T>
Represents a single page entry in the paginated inventory.
Link copied to clipboard
abstract class Refreshable<T : KtInventoryPaginatedAdventure>(clazz: KClass<T>) : AbstractKtInventoryPaginated.Refreshable<T>
Abstract class for refreshable paginated inventories with Adventure Component titles.
Properties
Link copied to clipboard
Map of all buttons in the inventory
Link copied to clipboard
abstract val entries: List<KtInventoryButton<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>>
List of entries to be paginated
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<KtInventoryPaginatedAdventure>>) -> Unit): KtInventoryButton<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>
Creates a new inventory button
Link copied to clipboard
fun nextPageButton(slot: Int, item: KtInventoryButton<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>)
fun nextPageButton(slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>) -> 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, item: KtInventoryButton<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>)
fun previousPageButton(slot: Int, itemStack: ItemStack, onClick: (KtInventoryButton.ClickEvent<AbstractKtInventoryPaginated.Entry<KtInventoryPaginatedAdventure>>) -> Unit = {})
Adds a button to navigate to the previous page