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, getDamageResistant, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, getTooltipStyle, getUseCooldown, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDamageResistant, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, hasTooltipStyle, hasUseCooldown, hasUseRemainder, isFireResistant, isGlider, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDamageResistant, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseRemainder, 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
-