summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/inventory/meta/BookMeta.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bukkit/inventory/meta/BookMeta.java')
-rw-r--r--src/main/java/org/bukkit/inventory/meta/BookMeta.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
index 987a2866..73148397 100644
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
@@ -18,13 +18,14 @@ public interface BookMeta extends ItemMeta {
/**
* Gets the title of the book.
+ * Plugins should check that hasTitle() returns true before calling this method.
*
* @return the title of the book
*/
String getTitle();
/**
- * Sets the title of the book. Limited to 16 characters.
+ * Sets the title of the book. Limited to 16 characters. Removes title when given null.
*
* @param title the title to set
* @return true if the title was successfully set
@@ -40,13 +41,14 @@ public interface BookMeta extends ItemMeta {
/**
* Gets the author of the book.
+ * Plugins should check that hasAuthor() returns true before calling this method.
*
* @return the author of the book
*/
String getAuthor();
/**
- * Sets the author of the book.
+ * Sets the author of the book. Removes author when given null.
*
* @param author the author of the book
*/
@@ -60,7 +62,7 @@ public interface BookMeta extends ItemMeta {
boolean hasPages();
/**
- * Gets the specified page in the book.
+ * Gets the specified page in the book. The given page must exist.
*
* @param page the page number to get
* @return the page from the book
@@ -68,7 +70,8 @@ public interface BookMeta extends ItemMeta {
String getPage(int page);
/**
- * Sets the specified page in the book.
+ * Sets the specified page in the book. Pages of the book must be contiguous.
+ * The data can be up to 256 characters in length, additional characters are trucated.
*
* @param page the page number to set
* @param data the data to set for that page
@@ -97,7 +100,7 @@ public interface BookMeta extends ItemMeta {
void setPages(String... pages);
/**
- * Adds new pages to the end of the book.
+ * Adds new pages to the end of the book. Up to a maximum of 50 pages with 256 characters per page.
*
* @param pages A list of strings, each being a page
*/