⭐
StarAPI Documentation
  • ⭐API Information
    • ❔About Our API's
    • ⬇️Installing Our API
  • 🌟StarAPI (Spigot/Paper)
    • 📂Abilities
      • ⏳Transmition
      • 🤯Implosion
      • 🏹MultiShot
    • 📂Builders
      • 👕Armor Builder
      • 📊Bossbar Builder
      • ☄️Command Builder
      • ⚔️Item Builder
      • 🧟‍♂️Mob Builder
      • 💯Scoreboard Builder
      • 🔗Webhook Builder
      • 🔨Message Builder
      • 🏗️Actionbar Builder
    • 📂Files
      • 📃Create Files
      • 📁Create Folders
      • 📖Read Files
      • 🖊️Write Files
    • 📂Inventory Utilities
      • 💎Animated Items
      • 📖Book Content
      • 📔Book GUI
      • 🎞️Filler
      • 🪁Inventory Items
      • 📝Inventory Name
      • 💀Inventory Skulls
    • 📂Message Utilities
      • 🤖Auto Responses
      • 🎨Message Colors
    • 📂Recipes
      • ⚒️Crafting Recipes
      • 🧑‍🍳Furnace Recipes
    • 📂Timers
      • 🕙Active Timers
      • ❌Cancel Timers
      • 🕙Delayed Timers
      • 🕐Create Timers
    • 📂Misc
      • 💀Give Skulls
      • 📈Progress Bars
      • ⬛Block Placer
Powered by GitBook
On this page
  • Overview
  • Methods
  • Notes
  1. StarAPI (Spigot/Paper)
  2. Inventory Utilities

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

public static void setPageContent(BookMeta bookMeta, int pageNumber, String clickUrl, String hoverText, String page, String... lines)

Sets the content of a specific page in the book with the provided properties.

Parameters

  • bookMeta: The BookMeta 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 be null for no action.

  • hoverText: The text to display when hovering over the last line of the page. Can be null for no hover text.

  • page: The page number or action to perform when clicking on the last line of the page. Can be null 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.

PreviousAnimated ItemsNextBook GUI

Last updated 1 year ago

🌟
📂
📖