Class Lotus<C>

java.lang.Object
studio.mevera.lotus.Lotus<C>

public final class Lotus<C> extends Object
Facade and runtime for the Lotus menu framework. One instance per plugin: holds open-view registry, configurable opener strategies, and the bound Bukkit listener.

Construct via platform factories such as PaperLotus.create(...) or SpigotLotus.create(...). All public mutators must be called on the server main thread.

  • Method Details

    • plugin

      @NotNull public @NotNull org.bukkit.plugin.Plugin plugin()
    • options

      @NotNull public @NotNull Lotus.Options options()
    • logger

      @NotNull public @NotNull LotusLogger logger()
    • registerOpener

      public void registerOpener(@NotNull @NotNull org.bukkit.event.inventory.InventoryType type, @NotNull @NotNull ViewOpener opener)
    • openerFor

      @NotNull public @NotNull ViewOpener<C> openerFor(@NotNull @NotNull org.bukkit.event.inventory.InventoryType type)
    • sessionFactory

      @NotNull public @NotNull PaginationSessionFactory<C> sessionFactory()
    • sessionFactory

      public void sessionFactory(@NotNull @NotNull PaginationSessionFactory<C> factory)
    • registerMenu

      public void registerMenu(@NotNull @NotNull Menu<C> menu)
    • registeredMenu

      @NotNull public @NotNull Optional<Menu<C>> registeredMenu(@NotNull @NotNull String name)
    • viewOf

      @NotNull public @NotNull Optional<MenuView<C,?>> viewOf(@NotNull @NotNull org.bukkit.entity.Player player)
    • openViews

      @NotNull public @NotNull Collection<MenuView<C,?>> openViews()
    • openMenu

      @NotNull public <M extends Menu<C>> @NotNull MenuView<C,M> openMenu(@NotNull @NotNull org.bukkit.entity.Player viewer, @NotNull M menu)
    • openMenu

      @NotNull public <M extends Menu<C>> @NotNull MenuView<C,M> openMenu(@NotNull @NotNull org.bukkit.entity.Player viewer, @NotNull M menu, @NotNull @NotNull DataRegistry data)
    • openMenu

      public void openMenu(@NotNull @NotNull org.bukkit.entity.Player viewer, @NotNull @NotNull String menuName)
    • track

      public void track(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull MenuView<C,?> view)
      Internal: registers/replaces the open view for a player. Called from platform listeners when a click arrives for an inventory whose holder is a Lotus view but the player isn't yet tracked (e.g. opened directly by another plugin).
    • untrack

      public void untrack(@NotNull @NotNull org.bukkit.entity.Player player)
    • resolveView

      @Nullable public @Nullable MenuView<C,?> resolveView(@NotNull @NotNull org.bukkit.entity.Player player)