Package studio.mevera.lotus.spi
Interface PaginationSessionFactory<C>
public interface PaginationSessionFactory<C>
Strategy that constructs per-player
PaginationSession instances.
Register a custom factory on Lotus to provide platform-specific sessions
(e.g. PaperPaginationSession for Adventure Component titles on Paper).
The default factory produces DefaultPaginationSession with plain String titles.
-
Method Summary
Modifier and TypeMethodDescription<T,X extends AbstractPageContext<C, T, ?>>
@NotNull PaginationSession<C, T, ? extends X> create(@NotNull AbstractPagination<C, T, X> definition, @NotNull Lotus<C> lotus, @NotNull org.bukkit.entity.Player viewer) Creates a newPaginationSessionfor the given definition and viewer.
-
Method Details
-
create
@NotNull <T,X extends AbstractPageContext<C, @NotNull PaginationSession<C,T, ?>> T, create? extends X> (@NotNull @NotNull AbstractPagination<C, T, X> definition, @NotNull @NotNull Lotus<C> lotus, @NotNull @NotNull org.bukkit.entity.Player viewer) Creates a newPaginationSessionfor the given definition and viewer. Implementations must NOT callPaginationSession.goTo(int)— that is handled byAbstractPagination.open(Lotus, Player).
-