Class BookWrapper
java.lang.Object
com.bencodez.advancedcore.api.bookgui.BookWrapper
Wrapper for creating and managing book GUIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a layout to the current page.addLine()Add a line to the current page.addPlaceholder(String toReplace, String replaceWith) Add a placeholder to this book.addToCurrentPage(net.md_5.bungee.api.chat.BaseComponent... baseComponents) Add components to the current page.Colorize a string.nextPage(int newSize) Move to the next page.voidopen(org.bukkit.entity.Player player) Open the book for a player.
-
Constructor Details
-
BookWrapper
Instantiates a new book wrapper.- Parameters:
title- the book title
-
-
Method Details
-
addLayout
Add a layout to the current page.- Parameters:
layout- the layout to add- Returns:
- this book wrapper
-
addLine
Add a line to the current page.- Returns:
- this book wrapper
-
addPlaceholder
Add a placeholder to this book.- Parameters:
toReplace- the string to replacereplaceWith- the replacement string- Returns:
- this book wrapper
-
addToCurrentPage
Add components to the current page.- Parameters:
baseComponents- the components to add- Returns:
- this book wrapper
-
colorize
Colorize a string.- Parameters:
s- the string to colorize- Returns:
- the colorized string
-
nextPage
Move to the next page.- Parameters:
newSize- the new page size- Returns:
- this book wrapper
-
open
public void open(org.bukkit.entity.Player player) Open the book for a player.- Parameters:
player- the player
-