|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BookMeta
Represents a book (Material.BOOK_AND_QUILL or Material.WRITTEN_BOOK) that can have a title, an author, and pages.
| Method Summary | |
|---|---|
void |
addPage(String... pages)
Adds new pages to the end of the book. |
BookMeta |
clone()
|
String |
getAuthor()
Gets the author of the book. |
String |
getPage(int page)
Gets the specified page in the book. |
int |
getPageCount()
Gets the number of pages in the book. |
List<String> |
getPages()
Gets all the pages in the book. |
String |
getTitle()
Gets the title of the book. |
boolean |
hasAuthor()
Checks for the existence of an author 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(String author)
Sets the author of the book. |
void |
setPage(int page,
String data)
Sets the specified page in the book. |
void |
setPages(List<String> pages)
Clears the existing book pages, and sets the book to use the provided pages. |
void |
setPages(String... pages)
Clears the existing book pages, and sets the book to use the provided pages. |
boolean |
setTitle(String title)
Sets the title of the book. |
| Methods inherited from interface org.bukkit.inventory.meta.ItemMeta |
|---|
addEnchant, getDisplayName, getEnchantLevel, getEnchants, getLore, hasDisplayName, hasEnchant, hasEnchants, hasLore, removeEnchant, setDisplayName, setLore |
| Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable |
|---|
serialize |
| Method Detail |
|---|
boolean hasTitle()
String getTitle()
boolean setTitle(String title)
title - the title to set
boolean hasAuthor()
String getAuthor()
void setAuthor(String author)
author - the author of the bookboolean hasPages()
String getPage(int page)
page - the page number to get
void setPage(int page,
String data)
page - the page number to setdata - the data to set for that pageList<String> getPages()
void setPages(List<String> pages)
pages - A list of pages to set the book to usevoid setPages(String... pages)
pages - A list of strings, each being a pagevoid addPage(String... pages)
pages - A list of strings, each being a pageint getPageCount()
BookMeta clone()
clone in interface ItemMeta
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||