Package org.bukkit.inventory.meta
Interface WritableBookMeta
- All Superinterfaces:
- Cloneable,- ConfigurationSerializable,- ItemMeta,- PersistentDataHolder
- All Known Subinterfaces:
- BookMeta
Represents a book (
Material.WRITABLE_BOOK or Material.WRITTEN_BOOK) that can have pages.- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds new pages to the end of the book.clone()getPage(int page) Gets the specified page in the book.intGets the number of pages in the book.getPages()Gets all the pages in the book.booleanhasPages()Checks for the existence of pages in the book.voidSets the specified page in the book.voidClears the existing book pages, and sets the book to use the provided pages.voidClears the existing book pages, and sets the book to use the provided pages.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializableserializeMethods inherited from interface org.bukkit.inventory.meta.ItemMetaaddAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getConsumable, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamageResistant, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, getTooltipStyle, getUseCooldown, getUseRemainder, hasAttributeModifiers, hasConflictingEnchant, hasConsumable, 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, setConsumable, setCustomModelData, setCustomModelDataComponent, setDamageResistant, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseRemainder, setVersionMethods inherited from interface org.bukkit.persistence.PersistentDataHoldergetPersistentDataContainer
- 
Method Details- 
hasPagesboolean hasPages()Checks for the existence of pages in the book.- Returns:
- true if the book has pages
 
- 
getPageGets the specified page in the book. The given page must exist.Pages are 1-indexed. - Parameters:
- page- the page number to get, in range [1, getPageCount()]
- Returns:
- the page from the book
 
- 
setPageSets the specified page in the book. Pages of the book must be contiguous.The data can be up to 1024 characters in length, additional characters are truncated. Pages are 1-indexed. - Parameters:
- page- the page number to set, in range [1, getPageCount()]
- data- the data to set for that page
 
- 
getPagesGets all the pages in the book.- Returns:
- list of all the pages in the book
 
- 
setPagesClears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.- Parameters:
- pages- A list of pages to set the book to use
 
- 
setPagesClears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.- Parameters:
- pages- A list of strings, each being a page
 
- 
addPageAdds new pages to the end of the book. Up to a maximum of 100 pages with 1024 characters per page.- Parameters:
- pages- A list of strings, each being a page
 
- 
getPageCountint getPageCount()Gets the number of pages in the book.- Returns:
- the number of pages in the book
 
- 
clone
 
-