Package studio.mevera.lotus.paper
Class PaperLotus
java.lang.Object
studio.mevera.lotus.paper.PaperLotus
Entry point for creating
Lotus instances configured for the Paper
platform.
The factory applies Paper-specific defaults, including a
PaperViewOpener for Adventure Component-based inventory
titles and a PaperLotus.PaperPaginationSessionFactory for Paper pagination
sessions.
Usage:
Lotus<Component> lotus = PaperLotus.create(this);
Lotus<Component> customized = PaperLotus.create(
this,
builder -> builder.debug(true).allowBottomInventoryClick(false)
);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPaginationSessionFactoryimplementation that createsPaperPaginationSessioninstances for Paper pagination definitions. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> create(@NotNull org.bukkit.plugin.Plugin plugin) Creates aLotusinstance with the default Paper configuration.static @NotNull studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> create(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull Consumer<studio.mevera.lotus.LotusBuilder<net.kyori.adventure.text.Component>> customizer) Creates aLotusinstance with Paper defaults applied and then exposes the builder for additional customization.static voidsyncOpenPagination(studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> lotus, String paginationId) Reloads all open Paper pagination views whose backing pagination definition matchespaginationId.static voidsyncOpenPagination(studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> lotus, String paginationId, org.bukkit.entity.Player player) Reloads an open Paper pagination view for the given player when the currently displayed pagination definition matchespaginationId.
-
Method Details
-
create
@NotNull public static @NotNull studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> create(@NotNull @NotNull org.bukkit.plugin.Plugin plugin) Creates aLotusinstance with the default Paper configuration.- Parameters:
plugin- the owning plugin used for listener registration- Returns:
- a Paper-configured Lotus facade
-
create
@NotNull public static @NotNull studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> create(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull Consumer<studio.mevera.lotus.LotusBuilder<net.kyori.adventure.text.Component>> customizer) Creates aLotusinstance with Paper defaults applied and then exposes the builder for additional customization.The
customizerruns after Paper defaults have been registered, so callers can override builder settings before the facade is built.- Parameters:
plugin- the owning plugin used for listener registrationcustomizer- callback used to customize the prepared builder- Returns:
- a configured Lotus facade for Paper
-
syncOpenPagination
public static void syncOpenPagination(studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> lotus, String paginationId, org.bukkit.entity.Player player) Reloads an open Paper pagination view for the given player when the currently displayed pagination definition matchespaginationId.- Parameters:
lotus- the Lotus instance managing open viewspaginationId- the pagination definition identifier to refreshplayer- the player whose current pagination view should be checked
-
syncOpenPagination
public static void syncOpenPagination(studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component> lotus, String paginationId) Reloads all open Paper pagination views whose backing pagination definition matchespaginationId.- Parameters:
lotus- the Lotus instance managing open viewspaginationId- the pagination definition identifier to refresh
-