Package net.kyori.adventure.inventory
Interface Book.Builder
-
- All Superinterfaces:
AbstractBuilder<Book>,Buildable.Builder<Book>
- Enclosing interface:
- Book
public static interface Book.Builder extends AbstractBuilder<Book>, Buildable.Builder<Book>
A builder for aBook.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Book.BuilderaddPage(@NotNull Component page)Add a page to the book.@NotNull Book.Builderauthor(@NotNull Component author)Set the author.@NotNull Bookbuild()Builds.@NotNull Book.Builderpages(@NotNull java.util.Collection<Component> pages)Add pages to the book.@NotNull Book.Builderpages(@NotNull Component @NotNull ... pages)Add pages to the book.@NotNull Book.Buildertitle(@NotNull Component title)Set the title.
-
-
-
Method Detail
-
title
@Contract("_ -> this") @NotNull @NotNull Book.Builder title(@NotNull @NotNull Component title)Set the title.- Parameters:
title- the title- Returns:
- this
- Since:
- 4.0.0
-
author
@Contract("_ -> this") @NotNull @NotNull Book.Builder author(@NotNull @NotNull Component author)Set the author.- Parameters:
author- the author- Returns:
- this
- Since:
- 4.0.0
-
addPage
@Contract("_ -> this") @NotNull @NotNull Book.Builder addPage(@NotNull @NotNull Component page)Add a page to the book.Each page's length will be limited by the size of the client's book viewer. Any text that does not fit will be truncated clientside.
- Parameters:
page- the page- Returns:
- this
- Since:
- 4.0.0
-
pages
@Contract("_ -> this") @NotNull @NotNull Book.Builder pages(@NotNull @NotNull Component @NotNull ... pages)Add pages to the book.- Parameters:
pages- pages to add- Returns:
- this
- Since:
- 4.0.0
- See Also:
for details on page values
-
pages
@Contract("_ -> this") @NotNull @NotNull Book.Builder pages(@NotNull @NotNull java.util.Collection<Component> pages)Add pages to the book.- Parameters:
pages- pages to add- Returns:
- this
- Since:
- 4.0.0
- See Also:
for details on page values
-
build
@NotNull @NotNull Book build()
Builds.- Specified by:
buildin interfaceAbstractBuilder<Book>- Specified by:
buildin interfaceBuildable.Builder<Book>- Returns:
- a new book
-
-