geforkt von Mirrors/Paper
Improvements to BookMeta API
* Added hasGeneration() * Corrected javadoc of methods for consistency and accuracy according to CraftBukkit behavior By: Roy Curtis <roy.adrian.curtis+github@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
79cf49436e
Commit
7c4e75f4f2
@ -62,7 +62,7 @@ public interface BookMeta extends ItemMeta {
|
|||||||
/**
|
/**
|
||||||
* Checks for the existence of an author in the book.
|
* Checks for the existence of an author in the book.
|
||||||
*
|
*
|
||||||
* @return the author of the book
|
* @return true if the book has an author
|
||||||
*/
|
*/
|
||||||
boolean hasAuthor();
|
boolean hasAuthor();
|
||||||
|
|
||||||
@ -79,23 +79,31 @@ public interface BookMeta extends ItemMeta {
|
|||||||
/**
|
/**
|
||||||
* Sets the author of the book. Removes author when given null.
|
* Sets the author of the book. Removes author when given null.
|
||||||
*
|
*
|
||||||
* @param author the author of the book
|
* @param author the author to set
|
||||||
*/
|
*/
|
||||||
void setAuthor(String author);
|
void setAuthor(String author);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the generation of the book, or null if it's out of bounds.
|
* Checks for the existence of generation level in the book.
|
||||||
*
|
*
|
||||||
* @return the generation of the book or null
|
* @return true if the book has a generation level
|
||||||
|
*/
|
||||||
|
boolean hasGeneration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the generation of the book.
|
||||||
|
* <p>
|
||||||
|
* Plugins should check that hasGeneration() returns true before calling
|
||||||
|
* this method.
|
||||||
|
*
|
||||||
|
* @return the generation of the book
|
||||||
*/
|
*/
|
||||||
Generation getGeneration();
|
Generation getGeneration();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the generation of the book.
|
* Sets the generation of the book. Removes generation when given null.
|
||||||
* <p>
|
|
||||||
* Assumes Generation.ORIGINAL if given null.
|
|
||||||
*
|
*
|
||||||
* @param generation the generation of the book
|
* @param generation the generation to set
|
||||||
*/
|
*/
|
||||||
void setGeneration(Generation generation);
|
void setGeneration(Generation generation);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren