Package net.kyori.adventure.inventory
Interface Book.Builder
- All Superinterfaces:
AbstractBuilder<Book>
,Buildable.Builder<Book>
- Enclosing interface:
- Book
A builder for a
Book
.- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull Book.Builder
Add a page to the book.@NotNull Book.Builder
Set the author.@NotNull Book
build()
Builds.@NotNull Book.Builder
pages
(@NotNull Collection<Component> pages) Add pages to the book.@NotNull Book.Builder
Add pages to the book.@NotNull Book.Builder
Set the title.
-
Method Details
-
title
Set the title.- Parameters:
title
- the title- Returns:
- this
- Since:
- 4.0.0
-
author
Set the author.- Parameters:
author
- the author- Returns:
- this
- Since:
- 4.0.0
-
addPage
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:
-
pages
@Contract("_ -> this") @NotNull @NotNull Book.Builder pages(@NotNull @NotNull Collection<Component> pages) Add pages to the book.- Parameters:
pages
- pages to add- Returns:
- this
- Since:
- 4.0.0
- See Also:
-
build
Builds.- Specified by:
build
in interfaceAbstractBuilder<Book>
- Specified by:
build
in interfaceBuildable.Builder<Book>
- Returns:
- a new book
-