public static interface Pagination.Builder
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Pagination.Builder.CharacterAndStyle
A builder for a character and style pair.
|
| Modifier and Type | Method and Description |
|---|---|
<T> @NonNull Pagination<T> |
build(@NonNull net.kyori.text.Component title,
Pagination.Renderer.RowRenderer<T> rowRenderer,
@NonNull Pagination.PageCommandFunction pageCommand)
Builds.
|
@NonNull Pagination.Builder |
line(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> line)
Sets the line character and style.
|
@NonNull Pagination.Builder |
nextButton(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> nextButton)
Sets the next button.
|
@NonNull Pagination.Builder |
previousButton(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> previousButton)
Sets the previous button.
|
@NonNull Pagination.Builder |
renderer(@NonNull Pagination.Renderer renderer)
Sets the renderer.
|
@NonNull Pagination.Builder |
resultsPerPage(int resultsPerPage)
Sets the number of results per page.
|
@NonNull Pagination.Builder |
width(int width)
Sets the width.
|
@NonNull Pagination.Builder width(int width)
width - the width@NonNull Pagination.Builder resultsPerPage(int resultsPerPage)
resultsPerPage - the number of results per page@NonNull Pagination.Builder renderer(@NonNull Pagination.Renderer renderer)
renderer - the renderer@NonNull Pagination.Builder line(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> line)
line - the line consumer@NonNull Pagination.Builder previousButton(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> previousButton)
previousButton - the button consumer@NonNull Pagination.Builder nextButton(@NonNull java.util.function.Consumer<Pagination.Builder.CharacterAndStyle> nextButton)
nextButton - the button consumer<T> @NonNull Pagination<T> build(@NonNull net.kyori.text.Component title, Pagination.Renderer.RowRenderer<T> rowRenderer, @NonNull Pagination.PageCommandFunction pageCommand)
T - the content typetitle - the titlerowRenderer - the row rendererpageCommand - the page commandjava.lang.IllegalStateException - if the title has not been setjava.lang.IllegalStateException - if the row renderer has not been set