Interface WrittenBookContent.Builder
- All Superinterfaces:
DataComponentBuilder<WrittenBookContent>
- Enclosing interface:
WrittenBookContent
@Experimental
@NonExtendable
public static interface WrittenBookContent.Builder
extends DataComponentBuilder<WrittenBookContent>
Builder for
WrittenBookContent
.-
Method Summary
Modifier and TypeMethodDescriptionaddFilteredPage
(Filtered<? extends ComponentLike> page) Adds a filterable page to this book.addFilteredPages
(List<Filtered<? extends ComponentLike>> pages) Adds filterable pages to this book.addPage
(ComponentLike page) Adds a page to this book.addPages
(List<? extends ComponentLike> page) Adds pages to this book.Sets the author of this book.filteredTitle
(Filtered<String> title) Sets the filterable title of this book.generation
(@org.checkerframework.common.value.qual.IntRange(from=0L, to=3L) int generation) Sets the generation of this book.resolved
(boolean resolved) Sets if the chat components in this book have already been resolved (entity selectors, scores substituted).Sets the title of this book.Methods inherited from interface io.papermc.paper.datacomponent.DataComponentBuilder
build
-
Method Details
-
title
Sets the title of this book.- Parameters:
title
- the title- Returns:
- the builder for chaining
- See Also:
-
filteredTitle
@Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder filteredTitle(Filtered<String> title) Sets the filterable title of this book.- Parameters:
title
- the title- Returns:
- the builder for chaining
- See Also:
-
author
Sets the author of this book.- Parameters:
author
- the author- Returns:
- the builder for chaining
- See Also:
-
generation
@Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder generation(@org.checkerframework.common.value.qual.IntRange(from=0L, to=3L) int generation) Sets the generation of this book.- Parameters:
generation
- the generation, [0-3]- Returns:
- the builder for chaining
- See Also:
-
resolved
Sets if the chat components in this book have already been resolved (entity selectors, scores substituted). Iffalse
, will be resolved when opened by a player.- Parameters:
resolved
- resolved- Returns:
- the builder for chaining
- See Also:
-
addPage
Adds a page to this book.- Parameters:
page
- the page- Returns:
- the builder for chaining
- See Also:
-
addPages
@Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addPages(List<? extends ComponentLike> page) Adds pages to this book.- Parameters:
page
- the pages- Returns:
- the builder for chaining
- See Also:
-
addFilteredPage
@Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addFilteredPage(Filtered<? extends ComponentLike> page) Adds a filterable page to this book.- Parameters:
page
- the page- Returns:
- the builder for chaining
- See Also:
-
addFilteredPages
@Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addFilteredPages(List<Filtered<? extends ComponentLike>> pages) Adds filterable pages to this book.- Parameters:
pages
- the pages- Returns:
- the builder for chaining
- See Also:
-