接口 WritableBookMeta
- 所有已知子接口:
BookMeta
Material.WRITABLE_BOOK 或 Material.WRITTEN_BOOK),可以拥有页面.-
方法概要
从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAdditionalTradeCost, getAsComponentString, getAsString, getAttackRange, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getBlocksAttacks, getBreakSound, getConsumable, getCustomModelData, getCustomModelDataComponent, getCustomTagContainer, getDamageResistances, getDamageResistant, getDamageType, getDamageTypeKey, getDisplayName, getEnchantable, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getEquippable, getFood, getItemFlags, getItemModel, getItemName, getJukeboxPlayable, getKineticWeapon, getLocalizedName, getLore, getMaxStackSize, getMinimumAttackCharge, getPiercingWeapon, getRarity, getSwingAnimation, getTool, getTooltipStyle, getUseCooldown, getUseEffects, getUseRemainder, getWeapon, hasAdditionalTradeCost, hasAttackRange, hasAttributeModifiers, hasBlocksAttacks, hasBreakSound, hasConflictingEnchant, hasConsumable, hasCustomModelData, hasCustomModelDataComponent, hasDamageResistant, hasDamageType, hasDisplayName, hasEnchant, hasEnchantable, hasEnchantmentGlintOverride, hasEnchants, hasEquippable, hasFood, hasItemFlag, hasItemModel, hasItemName, hasJukeboxPlayable, hasKineticWeapon, hasLocalizedName, hasLore, hasMaxStackSize, hasMinimumAttackCharge, hasPiercingWeapon, hasRarity, hasSwingAnimation, hasTool, hasTooltipStyle, hasUseCooldown, hasUseEffects, hasUseRemainder, hasWeapon, isFireResistant, isGlider, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAdditionalTradeCost, setAttackRange, setAttributeModifiers, setBlocksAttacks, setBreakSound, setConsumable, setCustomModelData, setCustomModelDataComponent, setDamageResistant, setDamageResistant, setDamageType, setDamageTypeKey, setDisplayName, setEnchantable, setEnchantmentGlintOverride, setEquippable, setFireResistant, setFood, setGlider, setHideTooltip, setItemModel, setItemName, setJukeboxPlayable, setKineticWeapon, setLocalizedName, setLore, setMaxStackSize, setMinimumAttackCharge, setPiercingWeapon, setRarity, setSwingAnimation, setTool, setTooltipStyle, setUnbreakable, setUseCooldown, setUseEffects, setUseRemainder, setVersion, setWeapon从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
方法详细资料
-
hasPages
boolean hasPages()检查书中是否存在页面.原文:Checks for the existence of pages in the book.
- 返回:
- 如果书中有页面则为 true
-
getPage
获取书中指定的页面。给定的页面必须存在.页面从 1 开始索引.
原文:Gets the specified page in the book. The given page must exist. Pages are 1-indexed.
- 参数:
page- 要获取的页码,范围为 [1, getPageCount()]- 返回:
- 书中的页面
-
setPage
设置书中指定的页面。书中的页面必须是连续的.数据长度最多为 1024 个字符,多余的字符将被截断.
页面从 1 开始索引.
原文:Sets 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.
- 参数:
page- 要设置的页码,范围为 [1, getPageCount()]data- 要为该页面设置的数据
-
getPages
获取书中所有页面.原文:Gets all the pages in the book.
- 返回:
- 书中所有页面的列表
-
setPages
清除现有的书页,并将书设置为使用提供的页面。最多 100 页,每页 1024 个字符.原文:Clears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.
- 参数:
pages- 要设置的页面列表
-
setPages
清除现有的书页,并将书设置为使用提供的页面。最多 100 页,每页 1024 个字符.原文:Clears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.
- 参数:
pages- 字符串列表,每个字符串为一页
-
addPage
向书末尾添加新页面。最多 100 页,每页 1024 个字符.原文:Adds new pages to the end of the book. Up to a maximum of 100 pages with 1024 characters per page.
- 参数:
pages- 字符串列表,每个字符串为一页
-
getPageCount
int getPageCount()获取书中的页数.原文:Gets the number of pages in the book.
- 返回:
- 书中的页数
-
clone
-