Book Content
Add content to the books
Overview
The BookContent
class provides utility methods for setting the content of book pages in a Minecraft Bukkit server environment. It allows developers to customize the content of individual pages in player-written books, including adding clickable links, hover text, and page navigation.
Methods
setPageContent
setPageContent
Sets the content of a specific page in the book with the provided properties.
Parameters
bookMeta
: TheBookMeta
object representing the book to modify.pageNumber
: The page number to set the content for (1 to 50).clickUrl
: The URL to open when clicking on the last line of the page. Can benull
for no action.hoverText
: The text to display when hovering over the last line of the page. Can benull
for no hover text.page
: The page number or action to perform when clicking on the last line of the page. Can benull
for no action.lines
: An array of strings representing the content lines of the page.
Notes
The
BookContent
class simplifies the process of setting custom content for individual pages in player-written books.Developers can use the
setPageContent
method to add text and interactive elements such as clickable links and hover text to specific pages in books.This can be useful for creating interactive guides, storybooks, or informational texts within the game that provide additional context or functionality to players.
Last updated