程序包 org.bukkit.inventory.meta

# 接口 WritableBookMeta

所有超级接口:
  `Cloneable`, `ConfigurationSerializable`, `ItemMeta`, `PersistentDataHolder`

所有已知子接口:
  `BookMeta`

public interface WritableBookMeta extends ItemMeta
Represents a book (`Material.WRITABLE_BOOK` or `Material.WRITTEN_BOOK`) that can have pages.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `void`
  `addPage(@NotNull String... pages)`
  Adds new pages to the end of the book.
  `@NotNull WritableBookMeta`
  `clone()`
  `@NotNull String`
  `getPage(int page)`
  Gets the specified page in the book.
  `int`
  `getPageCount()`
  Gets the number of pages in the book.
  `@NotNull List<String>`
  `getPages()`
  Gets all the pages in the book.
  `boolean`
  `hasPages()`
  Checks for the existence of pages in the book.
  `void`
  `setPage(int page, @NotNull String data)`
  Sets the specified page in the book.
  `void`
  `setPages(@NotNull String... pages)`
  Clears the existing book pages, and sets the book to use the provided pages.
  `void`
  `setPages(@NotNull List<String> pages)`
  Clears the existing book pages, and sets the book to use the provided pages.

  ### 从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable

  `serialize`

  ### 从接口继承的方法 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`

  ### 从接口继承的方法 org.bukkit.persistence.PersistentDataHolder

  `getPersistentDataContainer`

- ## 方法详细资料

  - ### hasPages

    boolean hasPages()
    Checks for the existence of pages in the book.
    返回:
      true if the book has pages

  - ### getPage

    @NotNull @NotNull String getPage(int page)
    Gets the specified page in the book. The given page must exist.

    Pages are 1-indexed.

    参数:
      `page` - the page number to get, in range [1, getPageCount()]
    返回:
      the page from the book

  - ### setPage

    void setPage(int page, @NotNull @NotNull String data)
    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` - the page number to set, in range [1, getPageCount()]
      `data` - the data to set for that page

  - ### getPages

    @NotNull @NotNull List<String> getPages()
    Gets all the pages in the book.
    返回:
      list of all the pages in the book

  - ### setPages

    void setPages(@NotNull @NotNull List<String> pages)
    Clears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.
    参数:
      `pages` - A list of pages to set the book to use

  - ### setPages

    void setPages(@NotNull @NotNull String... pages)
    Clears the existing book pages, and sets the book to use the provided pages. Maximum 100 pages with 1024 characters per page.
    参数:
      `pages` - A list of strings, each being a page

  - ### addPage

    void addPage(@NotNull @NotNull String... pages)
    Adds new pages to the end of the book. Up to a maximum of 100 pages with 1024 characters per page.
    参数:
      `pages` - A list of strings, each being a page

  - ### getPageCount

    int getPageCount()
    Gets the number of pages in the book.
    返回:
      the number of pages in the book

  - ### clone

    @NotNull @NotNull WritableBookMeta clone()
    指定者:
      `clone` 在接口中 `ItemMeta`