Refreshable

Base class for refreshable condition-fetched paginated inventories.

Since

2.2.0

Parameters

clazz

Class of the condition-fetched inventory

Type Parameters

T

Type of the condition-fetched inventory

C

Type of the display condition

Inheritors

Constructors

Link copied to clipboard
constructor(clazz: KClass<T>)

Types

Link copied to clipboard

Properties

Link copied to clipboard
val clazz: KClass<T>

Functions

Link copied to clipboard
abstract fun createNew(player: HumanEntity, inventory: AbstractKtInventoryPaginatedFetched.Entry<*, C>): T?

Creates new inventory instance.

Link copied to clipboard
override fun refresh(player: HumanEntity, inventory: AbstractKtInventoryPaginatedFetched.Entry<*, C>)

Refreshes the specified inventory for the player.

override fun refresh(player: HumanEntity, predicate: (AbstractKtInventoryPaginatedFetched.Entry<*, C>) -> Boolean = { true }): Boolean

Refreshes the inventory for the specified player based on a given predicate.

fun refresh(player: HumanEntity, inventory: AbstractKtInventoryPaginatedFetched.Entry<*, C>, behavior: AbstractKtInventoryPaginatedFetched.Refreshable.RefreshBehavior = RefreshBehavior.OpenFirst)

Refreshes specific inventory page for a player.

Refreshes inventory for a player if predicate matches.

Link copied to clipboard
override fun refreshAll(predicate: (Player, AbstractKtInventoryPaginatedFetched.Entry<*, C>) -> Boolean = { _, _ -> true })

Refreshes all inventories that match the given predicate.

fun refreshAll(behavior: AbstractKtInventoryPaginatedFetched.Refreshable.RefreshBehavior = RefreshBehavior.OpenFirst, predicate: (Player, AbstractKtInventoryPaginatedFetched.Entry<*, C>) -> Boolean = { _, _ -> true })

Refreshes inventory for all matching viewers.