Class BookFactory

java.lang.Object
com.palmergames.bukkit.util.BookFactory

public class BookFactory extends Object
Author:
LlmDl
  • Constructor Details

    • BookFactory

      public BookFactory()
  • Method Details

    • makeBook

      public static org.bukkit.inventory.ItemStack makeBook(String title, String author, String rawText)
      Returns a book itemstack with the given title, author and rawText.
      Parameters:
      title - Title of the book.
      author - Author of the book.
      rawText - The unprocessed text to be converted into book-friendly lines/pages.
      Returns:
      book ItemStack suitable for giving directly to a player inventory.
    • makeBook

      public static org.bukkit.inventory.ItemStack makeBook(String title, String author, List<String> pages)
      Returns a book itemstack with the given title, author and pages.
      Parameters:
      title - Title of the book.
      author - Author of the book.
      pages - List of Strings, each string intended to become one page in a book.
      Returns:
      book ItemStack suitable for giving directly to a player inventory or opening using Player#openBook().