Class PaginatedBuilder
java.lang.Object
io.rhythmknights.coreapi.component.modal.builder.modal.BaseModalBuilder<PaginatedModal,PaginatedBuilder>
io.rhythmknights.coreapi.component.modal.builder.modal.BaseChestModalBuilder<PaginatedModal,PaginatedBuilder>
io.rhythmknights.coreapi.component.modal.builder.modal.PaginatedBuilder
Modal builder for creating a
PaginatedModal-
Field Summary
Fields inherited from class io.rhythmknights.coreapi.component.modal.builder.modal.BaseModalBuilder
updateTitleOnItemClick -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PaginatedModalcreate()Creates a newPaginatedModal@NotNull PaginatedBuilderdynamicTitle(@NotNull String baseTitle) Enables a dynamic title that shows pagination information@NotNull PaginatedBuilderdynamicTitle(@NotNull String baseTitle, @NotNull Function<DynamicTitle.PaginationState, net.kyori.adventure.text.Component> titleFunction) Enables a dynamic title with custom formatting function@NotNull PaginatedBuilderinteractionDynamicTitle(@NotNull String baseTitle) Enables an interaction-based dynamic title@NotNull PaginatedBuilderinteractionDynamicTitle(@NotNull String baseTitle, @NotNull Function<DynamicTitle.InteractionState, net.kyori.adventure.text.Component> titleFunction) Enables an interaction-based dynamic title with custom formatting function@NotNull PaginatedBuilderpageSize(int pageSize) Sets the desirable page size, most of the time this isn't needed@NotNull PaginatedBuilderpaginationRegion(@NotNull PaginationRegion paginationRegion) Sets a specific region for pagination itemsMethods inherited from class io.rhythmknights.coreapi.component.modal.builder.modal.BaseChestModalBuilder
createContainer, getInventoryProvider, getRows, inventory, rowsMethods inherited from class io.rhythmknights.coreapi.component.modal.builder.modal.BaseModalBuilder
apply, consumeBuilder, disableAllInteractions, disableItemDrop, disableItemPlace, disableItemSwap, disableItemTake, disableOtherActions, enableAllInteractions, enableItemDrop, enableItemPlace, enableItemSwap, enableItemTake, enableOtherActions, getConsumer, getModifiers, getTitle, title, updateTitleOnItemClick
-
Constructor Details
-
PaginatedBuilder
public PaginatedBuilder()
-
-
Method Details
-
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 texttitleFunction- 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 texttitleFunction- Function to generate title from interaction state- Returns:
- The current builder
-
create
Creates a newPaginatedModal- Specified by:
createin classBaseModalBuilder<PaginatedModal,PaginatedBuilder> - Returns:
- A new
PaginatedModal
-