Package net.kyori.adventure.inventory
Interface Book
- All Superinterfaces:
- Buildable<Book,Book.Builder>,- net.kyori.examination.Examinable
public interface Book extends Buildable<Book,Book.Builder>, net.kyori.examination.Examinable
A signed book.
- Since:
- 4.0.0
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceBook.BuilderA builder for aBook.
- 
Method SummaryModifier and Type Method Description @NonNull Componentauthor()Gets the author.@NonNull Bookauthor(@NonNull Component author)Changes the book's author.static @NonNull Bookbook(@NonNull Component title, @NonNull Component author, @NonNull Collection<Component> pages)Creates a book.static @NonNull Bookbook(@NonNull Component title, @NonNull Component author, @NonNull Component @NonNull ... pages)Creates a book.static @NonNull Book.Builderbuilder()Create a new builder that will create aBook.@NonNull List<Component>pages()Gets the list of pages.@NonNull Bookpages(@NonNull List<Component> pages)Returns an updated book with the provided pages.default @NonNull Bookpages(@NonNull Component @NonNull ... pages)Returns an updated book with the provided pages.@NonNull Componenttitle()Gets the title.@NonNull Booktitle(@NonNull Component title)Changes the book's title.default @NonNull Book.BuildertoBuilder()Create a new builder initialized with the attributes of this book.
- 
Method Details- 
bookstatic @NonNull Book book(@NonNull Component title, @NonNull Component author, @NonNull Collection<Component> pages)Creates a book.- Parameters:
- title- the title
- author- the author
- pages- the collection of pages
- Returns:
- a book
- Since:
- 4.0.0
 
- 
bookstatic @NonNull Book book(@NonNull Component title, @NonNull Component author, @NonNull Component @NonNull ... pages)Creates a book.- Parameters:
- title- the title
- author- the author
- pages- an array of pages
- Returns:
- a book
- Since:
- 4.0.0
 
- 
builderCreate a new builder that will create aBook.- Returns:
- a builder
- Since:
- 4.0.0
 
- 
title@NonNull Component title()Gets the title.- Returns:
- the title
- Since:
- 4.0.0
 
- 
titleChanges the book's title.- Parameters:
- title- the title
- Returns:
- a new book with modifications
- Since:
- 4.0.0
 
- 
author@NonNull Component author()Gets the author.- Returns:
- the author
- Since:
- 4.0.0
 
- 
authorChanges the book's author.- Parameters:
- author- the author
- Returns:
- a new book with modifications
- Since:
- 4.0.0
 
- 
pagesGets the list of pages.The returned collection will be unmodifiable. - Returns:
- the list of pages
- Since:
- 4.0.0
 
- 
pagesReturns an updated book with the provided pages.- Parameters:
- pages- the pages to set
- Returns:
- a new book with modifications
- Since:
- 4.0.0
 
- 
pagesReturns an updated book with the provided pages.- Parameters:
- pages- the pages to set
- Returns:
- a new book with modifications
- Since:
- 4.0.0
 
- 
toBuilderCreate a new builder initialized with the attributes of this book.- Specified by:
- toBuilderin interface- Buildable<Book,Book.Builder>
- Returns:
- the builder
 
 
-