Class PaperLotus

java.lang.Object
studio.mevera.lotus.paper.PaperLotus

public final class PaperLotus extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    PaginationSessionFactory implementation that creates PaperPaginationSession instances for Paper pagination definitions.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull studio.mevera.lotus.Lotus<net.kyori.adventure.text.Component>
    create(@NotNull org.bukkit.plugin.Plugin plugin)
    Creates a Lotus instance 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 a Lotus instance with Paper defaults applied and then exposes the builder for additional customization.
    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 matches paginationId.
    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 matches paginationId.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a Lotus instance 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 a Lotus instance with Paper defaults applied and then exposes the builder for additional customization.

      The customizer runs 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 registration
      customizer - 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 matches paginationId.
      Parameters:
      lotus - the Lotus instance managing open views
      paginationId - the pagination definition identifier to refresh
      player - 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 matches paginationId.
      Parameters:
      lotus - the Lotus instance managing open views
      paginationId - the pagination definition identifier to refresh