refresh

override fun refresh(player: HumanEntity, predicate: (AbstractKtInventoryPaginated.Entry<T>) -> Boolean): Boolean

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

Return

True if the refresh was successful, false otherwise

Since

2.0.0

Parameters

player

The player whose inventory should be refreshed

predicate

A function that determines whether an inventory should be refreshed. Returns true to refresh, false to skip.


override fun refresh(player: HumanEntity, inventory: AbstractKtInventoryPaginated.Entry<T>)

Refreshes the specified inventory for the player.

Return

True if the refresh was successful, false otherwise

Since

2.0.0

Parameters

player

The player whose inventory should be refreshed

inventory

The inventory to refresh


Refreshes inventory for a player if predicate matches

Return

True if inventory was refreshed

Since

2.0.0

Parameters

player

Player to refresh inventory for

behavior

Refresh behavior

predicate

Condition for refresh


fun refresh(player: HumanEntity, inventory: AbstractKtInventoryPaginated.Entry<T>, behavior: AbstractKtInventoryPaginated.Refreshable.RefreshBehavior = RefreshBehavior.OpenFirst)

Refreshes specific inventory page for a player

Since

2.0.0

Parameters

player

Player to refresh inventory for

inventory

Current inventory page

behavior

Refresh behavior