Package org.bukkit.inventory.meta
Interface BookMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
,WritableBookMeta
Represents a
Material.WRITTEN_BOOK
) that can have a title, an author,
and pages.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents the generation (or level of copying) of a written bookstatic class
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Gets the author of the book.Gets the generation of the book.getTitle()
Gets the title of the book.boolean
Checks for the existence of an author in the book.boolean
Checks for the existence of generation level in the book.boolean
hasTitle()
Checks for the existence of a title in the book.void
Sets the author of the book.void
setGeneration
(BookMeta.Generation generation) Sets the generation of the book.boolean
Sets the title of the book.spigot()
Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
Methods inherited from interface org.bukkit.inventory.meta.WritableBookMeta
addPage, getPage, getPageCount, getPages, hasPages, setPage, setPages, setPages
-
Method Details
-
hasTitle
boolean hasTitle()Checks for the existence of a title in the book.- Returns:
- true if the book has a title
-
getTitle
Gets the title of the book.Plugins should check that hasTitle() returns true before calling this method.
- Returns:
- the title of the book
-
setTitle
Sets the title of the book.Limited to 32 characters. Removes title when given null.
- Parameters:
title
- the title to set- Returns:
- true if the title was successfully set
-
hasAuthor
boolean hasAuthor()Checks for the existence of an author in the book.- Returns:
- true if the book has an author
-
getAuthor
Gets the author of the book.Plugins should check that hasAuthor() returns true before calling this method.
- Returns:
- the author of the book
-
setAuthor
Sets the author of the book. Removes author when given null.- Parameters:
author
- the author to set
-
hasGeneration
boolean hasGeneration()Checks for the existence of generation level in the book.- Returns:
- true if the book has a generation level
-
getGeneration
Gets the generation of the book.Plugins should check that hasGeneration() returns true before calling this method.
- Returns:
- the generation of the book
-
setGeneration
Sets the generation of the book. Removes generation when given null.- Parameters:
generation
- the generation to set
-
clone
- Specified by:
clone
in interfaceItemMeta
- Specified by:
clone
in interfaceWritableBookMeta
-
spigot
-