Interface TitleUpdater
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Updates the title of the inventory currently open for a player without forcing the player to
close and reopen the GUI.
The default bean is chosen by the spigot-boot-inventory-api-nms module via
InventoryApiNMS#getTitleUpdater(): for servers running 1.20 or newer it returns a
Bukkit-API updater (InventoryView#setTitle), and for older servers it dispatches to a
per-version NMS implementation. Users wanting a custom strategy can register their own
TitleUpdater bean — the auto-configuration's factory is guarded by
@ConditionalOnMissingBean.
Calling update(Player, String) when no inventory is currently open is a no-op
on the Bukkit-API path; for that case there is nothing to update.
-
Method Summary
-
Method Details
-
update
Replaces the title shown on the inventory the player has open.- Parameters:
player- the viewer whose open inventory should be retitledtitle- the new title text
-