Interface WrittenBookContent.Builder

All Superinterfaces:
DataComponentBuilder<WrittenBookContent>
Enclosing interface:
WrittenBookContent

@NonExtendable public static interface WrittenBookContent.Builder extends DataComponentBuilder<WrittenBookContent>
Builder for WrittenBookContent.
Since:
1.21.3
  • Method Details

    • title

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder title(String title)
      Sets the title of this book.
      Parameters:
      title - the title
      Returns:
      the builder for chaining
      Since:
      1.21.3
      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
      Since:
      1.21.3
      See Also:
    • author

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder author(String author)
      Sets the author of this book.
      Parameters:
      author - the author
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • generation

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder generation(@IntRange(from=0L,to=3L) int generation)
      Sets the generation of this book.
      Parameters:
      generation - the generation, [0-3]
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • resolved

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder resolved(boolean resolved)
      Sets if the chat components in this book have already been resolved (entity selectors, scores substituted). If false, will be resolved when opened by a player.
      Parameters:
      resolved - resolved
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • addPage

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addPage(net.kyori.adventure.text.ComponentLike page)
      Adds a page to this book.
      Parameters:
      page - the page
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • addPages

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addPages(List<? extends net.kyori.adventure.text.ComponentLike> page)
      Adds pages to this book.
      Parameters:
      page - the pages
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • addFilteredPage

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addFilteredPage(Filtered<? extends net.kyori.adventure.text.ComponentLike> page)
      Adds a filterable page to this book.
      Parameters:
      page - the page
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also:
    • addFilteredPages

      @Contract(value="_ -> this", mutates="this") WrittenBookContent.Builder addFilteredPages(List<Filtered<? extends net.kyori.adventure.text.ComponentLike>> pages)
      Adds filterable pages to this book.
      Parameters:
      pages - the pages
      Returns:
      the builder for chaining
      Since:
      1.21.3
      See Also: