Interface PaginationHost
- All Known Implementing Classes:
PaginationBinding
@Internal
public interface PaginationHost
The world-facing seam the relocated pagination engine talks to instead of the 2.x
Viewer/InventoryEditor pair. Implemented per (session, token) by the
pagination binding, so a view declaring several pagination tokens keeps fillPage
and requestRender disambiguated per token.-
Method Summary
Modifier and TypeMethodDescriptionvoidfillPage(@NotNull List<RenderedItem> items, @NotNull Layout layout) Applies one engine frame: itemiis mapped ontolayout.slots().get(i).booleanisActive()Returns whether the bound session is currently paintable.@Nullable org.bukkit.entity.Playerplayer()Returns the live viewer the settle dispatcher uses to route the settle to the correct region thread.@Nullable UUIDplayerId()Returns the player pages are being loaded for; populates the slimPageRequest.@NotNull org.bukkit.plugin.Pluginplugin()Returns the plugin that owns the view; asynchronously completed settles are scheduled through it.voidRequests a reactive settle pass for the owning token: the engine repaints the token's pagination area and every component watching the token.
-
Method Details
-
isActive
boolean isActive()Returns whether the bound session is currently paintable.- Returns:
truewhile the session status is ACTIVE or TRANSITIONING
-
fillPage
Applies one engine frame: itemiis mapped ontolayout.slots().get(i).- Parameters:
items- the rendered slot contents, one per layout slotlayout- the fill order the items map onto
-
requestRender
void requestRender()Requests a reactive settle pass for the owning token: the engine repaints the token's pagination area and every component watching the token. -
playerId
Returns the player pages are being loaded for; populates the slimPageRequest.- Returns:
- the viewing player's id; production hosts never return null (test fixtures may)
-
player
@Nullable @Nullable org.bukkit.entity.Player player()Returns the live viewer the settle dispatcher uses to route the settle to the correct region thread. Production hosts always return the session's player; test fixtures may returnnullto trigger the inline-settle path.- Returns:
- the viewing player, or
nullfor test fixtures
-
plugin
@NotNull @NotNull org.bukkit.plugin.Plugin plugin()Returns the plugin that owns the view; asynchronously completed settles are scheduled through it.- Returns:
- the owning plugin
-