Refreshable
abstract class Refreshable<T : KtInventoryPaginatedSequenceAdventure>(clazz: KClass<T>) : AbstractKtInventoryPaginatedSequence.Refreshable<T>
Abstract class for refreshable sequence-backed inventories with Adventure Component titles.
Since
2.2.0
Parameters
clazz
The KClass of the sequence-backed inventory type
Type Parameters
T
Type of the sequence-backed inventory
Functions
Link copied to clipboard
abstract override fun createNew(player: HumanEntity, inventory: AbstractKtInventoryPaginatedSequence.Entry<T>): T?
Creates new inventory instance.
Link copied to clipboard
Refreshes the specified inventory for the player.
override fun refresh(player: HumanEntity, predicate: (AbstractKtInventoryPaginatedSequence.Entry<T>) -> Boolean = { true }): Boolean
Refreshes the inventory for the specified player based on a given predicate.
fun refresh(player: HumanEntity, inventory: AbstractKtInventoryPaginatedSequence.Entry<T>, behavior: AbstractKtInventoryPaginatedSequence.Refreshable.RefreshBehavior = RefreshBehavior.OpenFirst)
Refreshes specific inventory page for a player.
fun refresh(player: HumanEntity, behavior: AbstractKtInventoryPaginatedSequence.Refreshable.RefreshBehavior, predicate: (AbstractKtInventoryPaginatedSequence.Entry<T>) -> Boolean = { true }): Boolean
Refreshes inventory for a player if predicate matches.
Link copied to clipboard
override fun refreshAll(predicate: (Player, AbstractKtInventoryPaginatedSequence.Entry<T>) -> Boolean = { _, _ -> true })
Refreshes all inventories that match the given predicate.
fun refreshAll(behavior: AbstractKtInventoryPaginatedSequence.Refreshable.RefreshBehavior = RefreshBehavior.OpenFirst, predicate: (Player, AbstractKtInventoryPaginatedSequence.Entry<T>) -> Boolean = { _, _ -> true })
Refreshes inventory for all matching viewers.