接口 BookMeta
- 所有超级接口:
Cloneable,ConfigurationSerializable,ItemMeta
-
嵌套类概要
嵌套类修饰符和类型接口说明static enumRepresents the generation (or level of copying) of a written book -
方法概要
修饰符和类型方法说明void在这本书的最后添加页面.最多50页,每页最多256个字符.clone()获取这本书的作者.Gets the generation of the book.getPage(int page) 获取这本书指定页面的内容.给定的页面必须存在.int获取这本书有多少页.getPages()获取这本书的全部页面.getTitle()获取这本书的标题.boolean检测这本书是否存在作者.booleanChecks for the existence of generation level in the book.booleanhasPages()检测这本书是否存在页面.booleanhasTitle()检测书是否存在标题.void设置这本书的作者.如果设置为null将移除作者.voidsetGeneration(BookMeta.Generation generation) Sets the generation of the book.void设置这本书指定页面的内容.书页必须是连续的.void清除存在的书页,并设置书提供的书页.最多50页,每页最多256个字符.void清除存在的书页,并设置书提供的书页.最多50页,每页最多256个字符.boolean设置这本书的标题.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addEnchant, addItemFlags, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeEnchant, removeItemFlags, setDisplayName, setLocalizedName, setLore, setUnbreakable
-
方法详细资料
-
hasTitle
boolean hasTitle()检测书是否存在标题.原文:Checks for the existence of a title in the book.
- 返回:
- 这本书是否有标题
-
getTitle
String getTitle()获取这本书的标题.插件应该在调用这个方法之前检测hasTitle()是否返回true.
原文:Gets the title of the book.
Plugins should check that hasTitle() returns true before calling this method.
- 返回:
- 这本书的标题
-
setTitle
设置这本书的标题.仅限16个字符.如果设置为null将移除标题.
原文:Sets the title of the book.
Limited to 16 characters. Removes title when given null.
- 参数:
title- 要设置的标题- 返回:
- 如果成功设置标题则为true
-
hasAuthor
boolean hasAuthor()检测这本书是否存在作者.原文:Checks for the existence of an author in the book.
- 返回:
- 这本书是否有作者
-
getAuthor
String getAuthor()获取这本书的作者.插件应该在调用这个方法之前检测hasAuthor()是否返回true.
原文:Gets the author of the book.
Plugins should check that hasAuthor() returns true before calling this method.
- 返回:
- 这本书的作者
-
setAuthor
设置这本书的作者.如果设置为null将移除作者.原文:Sets the author of the book. Removes author when given null.
- 参数:
author- 这本书的作者
-
hasGeneration
boolean hasGeneration()Checks for the existence of generation level in the book.- 返回:
- true if the book has a generation level
-
getGeneration
BookMeta.Generation getGeneration()Gets the generation of the book.Plugins should check that hasGeneration() returns true before calling this method.
- 返回:
- the generation of the book
-
setGeneration
Sets the generation of the book. Removes generation when given null.- 参数:
generation- the generation to set
-
hasPages
boolean hasPages()检测这本书是否存在页面.原文:Checks for the existence of pages in the book.
- 返回:
- 如果这本书有页面返回true
-
getPage
获取这本书指定页面的内容.给定的页面必须存在.原文:Gets the specified page in the book. The given page must exist.
- 参数:
page- 指定页码- 返回:
- 这个页码的内容
-
setPage
设置这本书指定页面的内容.书页必须是连续的.数据的长度最大为256个字符,超出部分将被截断.
原文:Sets the specified page in the book. Pages of the book must be contiguous.
The data can be up to 256 characters in length, additional characters are truncated.
- 参数:
page- 要设置的页码data- 那个书页的内容
-
getPages
获取这本书的全部页面.原文:Gets all the pages in the book.
- 返回:
- 这本书的全部页面的内容
-
setPages
清除存在的书页,并设置书提供的书页.最多50页,每页最多256个字符.原文:Clears the existing book pages, and sets the book to use the provided pages. Maximum 50 pages with 256 characters per page.
- 参数:
pages- 要设置的书页的内容的列表
-
setPages
清除存在的书页,并设置书提供的书页.最多50页,每页最多256个字符.原文:Clears the existing book pages, and sets the book to use the provided pages. Maximum 50 pages with 256 characters per page.
- 参数:
pages- 每页的内容的列表
-
addPage
在这本书的最后添加页面.最多50页,每页最多256个字符.原文:Adds new pages to the end of the book. Up to a maximum of 50 pages with 256 characters per page.
- 参数:
pages- 每页的内容的列表
-
getPageCount
int getPageCount()获取这本书有多少页.原文:Gets the number of pages in the book.
- 返回:
- 这本书的页数
-
clone
BookMeta clone()
-