Package com.palmergames.bukkit.util
Class BookFactory
java.lang.Object
com.palmergames.bukkit.util.BookFactory
- Author:
- LlmDl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStack
Returns a book itemstack with the given title, author and rawText.static org.bukkit.inventory.ItemStack
Returns a book itemstack with the given title, author and pages.
-
Constructor Details
-
BookFactory
public BookFactory()
-
-
Method Details
-
makeBook
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().
-