java.lang.Cloneable, ConfigurationSerializable, ItemMetapublic interface BookMeta extends ItemMeta
Material.WRITABLE_BOOK or Material.WRITTEN_BOOK) that can have a title, an author, and pages.| Modifier and Type | Interface | Description |
|---|---|---|
static class |
BookMeta.Generation |
Represents the generation (or level of copying) of a written book
|
static class |
BookMeta.Spigot |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPage(java.lang.String... pages) |
Adds new pages to the end of the book.
|
BookMeta |
clone() |
|
java.lang.String |
getAuthor() |
Gets the author of the book.
|
BookMeta.Generation |
getGeneration() |
Gets the generation of the book.
|
java.lang.String |
getPage(int page) |
Gets the specified page in the book.
|
int |
getPageCount() |
Gets the number of pages in the book.
|
java.util.List<java.lang.String> |
getPages() |
Gets all the pages in the book.
|
java.lang.String |
getTitle() |
Gets the title of the book.
|
boolean |
hasAuthor() |
Checks for the existence of an author in the book.
|
boolean |
hasGeneration() |
Checks for the existence of generation level in the book.
|
boolean |
hasPages() |
Checks for the existence of pages in the book.
|
boolean |
hasTitle() |
Checks for the existence of a title in the book.
|
void |
setAuthor(java.lang.String author) |
Sets the author of the book.
|
void |
setGeneration(BookMeta.Generation generation) |
Sets the generation of the book.
|
void |
setPage(int page,
java.lang.String data) |
Sets the specified page in the book.
|
void |
setPages(java.lang.String... pages) |
Clears the existing book pages, and sets the book to use the provided
pages.
|
void |
setPages(java.util.List<java.lang.String> pages) |
Clears the existing book pages, and sets the book to use the provided
pages.
|
boolean |
setTitle(java.lang.String title) |
Sets the title of the book.
|
BookMeta.Spigot |
spigot() |
serializeaddEnchant, addItemFlags, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeEnchant, removeItemFlags, setDisplayName, setLocalizedName, setLore, setUnbreakableboolean hasTitle()
java.lang.String getTitle()
Plugins should check that hasTitle() returns true before calling this method.
boolean setTitle(java.lang.String title)
Limited to 16 characters. Removes title when given null.
title - the title to setboolean hasAuthor()
java.lang.String getAuthor()
Plugins should check that hasAuthor() returns true before calling this method.
void setAuthor(java.lang.String author)
author - the author to setboolean hasGeneration()
BookMeta.Generation getGeneration()
Plugins should check that hasGeneration() returns true before calling this method.
void setGeneration(BookMeta.Generation generation)
generation - the generation to setboolean hasPages()
java.lang.String getPage(int page)
page - the page number to getvoid setPage(int page,
java.lang.String data)
The data can be up to 256 characters in length, additional characters are truncated.
page - the page number to setdata - the data to set for that pagejava.util.List<java.lang.String> getPages()
void setPages(java.util.List<java.lang.String> pages)
pages - A list of pages to set the book to usevoid setPages(java.lang.String... pages)
pages - A list of strings, each being a pagevoid addPage(java.lang.String... pages)
pages - A list of strings, each being a pageint getPageCount()
BookMeta.Spigot spigot()
Copyright © 2018. All rights reserved.