public class PaginatedBuilder extends BaseChestModalBuilder<PaginatedModal,PaginatedBuilder>
Modal builder for creating a PaginatedModal
  • Constructor Details

    • PaginatedBuilder

      public PaginatedBuilder()
  • Method Details

    • pageSize

      @NotNull @Contract("_ -> this") public @NotNull PaginatedBuilder pageSize(int pageSize)
      Sets the desirable page size, most of the time this isn't needed
      Parameters:
      pageSize - The amount of free slots that page items should occupy
      Returns:
      The current builder
    • paginationRegion

      @NotNull @Contract("_ -> this") public @NotNull PaginatedBuilder paginationRegion(@NotNull @NotNull PaginationRegion paginationRegion)
      Sets a specific region for pagination items
      Parameters:
      paginationRegion - Region defining which slots to use for pagination
      Returns:
      The current builder
    • dynamicTitle

      @NotNull @Contract("_ -> this") public @NotNull PaginatedBuilder dynamicTitle(@NotNull @NotNull String baseTitle)
      Enables a dynamic title that shows pagination information
      Parameters:
      baseTitle - Base title text without pagination info
      Returns:
      The current builder
    • dynamicTitle

      @NotNull @Contract("_, _ -> this") public @NotNull PaginatedBuilder dynamicTitle(@NotNull @NotNull String baseTitle, @NotNull @NotNull Function<DynamicTitle.PaginationState,net.kyori.adventure.text.Component> titleFunction)
      Enables a dynamic title with custom formatting function
      Parameters:
      baseTitle - Base title text
      titleFunction - Function to generate title from pagination state
      Returns:
      The current builder
    • interactionDynamicTitle

      @NotNull @Contract("_ -> this") public @NotNull PaginatedBuilder interactionDynamicTitle(@NotNull @NotNull String baseTitle)
      Enables an interaction-based dynamic title
      Parameters:
      baseTitle - Base title text
      Returns:
      The current builder
    • interactionDynamicTitle

      @NotNull @Contract("_, _ -> this") public @NotNull PaginatedBuilder interactionDynamicTitle(@NotNull @NotNull String baseTitle, @NotNull @NotNull Function<DynamicTitle.InteractionState,net.kyori.adventure.text.Component> titleFunction)
      Enables an interaction-based dynamic title with custom formatting function
      Parameters:
      baseTitle - Base title text
      titleFunction - Function to generate title from interaction state
      Returns:
      The current builder
    • create

      @NotNull @Contract(" -> new") public @NotNull PaginatedModal create()
      Creates a new PaginatedModal
      Specified by:
      create in class BaseModalBuilder<PaginatedModal,PaginatedBuilder>
      Returns:
      A new PaginatedModal