Interface PaginationDisplay

All Superinterfaces:
Composable, ComposableLike, Configurable<PaginationDisplay>

public interface PaginationDisplay extends Composable, Configurable<PaginationDisplay>
Pagination display is used to display pagination state.
See more in Flare docs: PaginationDisplay
  • Method Details

    • arrowForwardButton

      @NotNull static @NotNull ItemStackBuilder arrowForwardButton(boolean disabled)
      Returns the item builder for arrow forward button
      Parameters:
      disabled - Whether the button is disabled
      Returns:
      Item builder
    • arrowBackwardButton

      @NotNull static @NotNull ItemStackBuilder arrowBackwardButton(boolean disabled)
      Returns the item builder for arrow backward button
      Parameters:
      disabled - Whether the button is disabled
      Returns:
      Item builder
    • pageNumber

      @NotNull static @NotNull ItemStackBuilder pageNumber(Frame frame, int page, boolean selected, @Nullable @Nullable org.bukkit.entity.Player player)
      Returns the item builder for page select button
      Parameters:
      frame - The page frame
      page - The index of the page
      selected - Whether the button is selected
      player - The player viewer
      Returns:
      Item builder
    • of

      @NotNull static @NotNull PaginationDisplay of(Pagination<?> pagination)
      Creates a new pagination display
      Parameters:
      pagination - The pagination used
      Returns:
      New pagination display
    • of

      @NotNull static @NotNull PaginationDisplay of(Pagination<?> pagination, int idx)
      Creates a new pagination display
      Parameters:
      pagination - The pagination used
      idx - Currently selected page index
      Returns:
      New pagination display
    • builder

      @NotNull static @NotNull PaginationDisplay.Builder builder(Pagination<?> pagination)
      Creates a new pagination builder
      Parameters:
      pagination - The pagination to use
      Returns:
      A new pagination builder
    • getPagination

      Pagination<?> getPagination()
      Gets the current pagination
      Returns:
      The currently used pagination
    • selectedIndex

      ReactiveState<Integer> selectedIndex()
      Returns the reactive state of the selected page index
      Returns:
      The reactive state of the selected page index
    • selectedFrame

      ReactiveState<Frame> selectedFrame()
      Returns the reactive state of the selected page frame
      Returns:
      The reactive state of the selected page frame
    • switchPage

      default void switchPage(int page)
      Switches to another page index
      Parameters:
      page - Page index to switch to