geforkt von Mirrors/Paper
SPIGOT-783: API for book generation data.
By: Roy Curtis <roy.adrian.curtis+github@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
b29158219c
Commit
515b95570f
@ -10,6 +10,28 @@ import org.bukkit.Material;
|
|||||||
*/
|
*/
|
||||||
public interface BookMeta extends ItemMeta {
|
public interface BookMeta extends ItemMeta {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the generation (or level of copying) of a written book
|
||||||
|
*/
|
||||||
|
enum Generation {
|
||||||
|
/**
|
||||||
|
* Book written into a book-and-quill. Can be copied. (Default value)
|
||||||
|
*/
|
||||||
|
ORIGINAL,
|
||||||
|
/**
|
||||||
|
* Book that was copied from an original. Can be copied.
|
||||||
|
*/
|
||||||
|
COPY_OF_ORIGINAL,
|
||||||
|
/**
|
||||||
|
* Book that was copied from a copy of an original. Can't be copied.
|
||||||
|
*/
|
||||||
|
COPY_OF_COPY,
|
||||||
|
/**
|
||||||
|
* Unused; unobtainable by players. Can't be copied.
|
||||||
|
*/
|
||||||
|
TATTERED;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for the existence of a title in the book.
|
* Checks for the existence of a title in the book.
|
||||||
*
|
*
|
||||||
@ -61,6 +83,22 @@ public interface BookMeta extends ItemMeta {
|
|||||||
*/
|
*/
|
||||||
void setAuthor(String author);
|
void setAuthor(String author);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the generation of the book, or null if it's out of bounds.
|
||||||
|
*
|
||||||
|
* @return the generation of the book or null
|
||||||
|
*/
|
||||||
|
Generation getGeneration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the generation of the book.
|
||||||
|
* <p>
|
||||||
|
* Assumes Generation.ORIGINAL if given null.
|
||||||
|
*
|
||||||
|
* @param generation the generation of the book
|
||||||
|
*/
|
||||||
|
void setGeneration(Generation generation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for the existence of pages in the book.
|
* Checks for the existence of pages in the book.
|
||||||
*
|
*
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren