Class BookWrapper

java.lang.Object
com.bencodez.advancedcore.api.bookgui.BookWrapper

public class BookWrapper extends Object
Wrapper for creating and managing book GUIs.
  • Constructor Details

    • BookWrapper

      public BookWrapper(String title)
      Instantiates a new book wrapper.
      Parameters:
      title - the book title
  • Method Details

    • addLayout

      public BookWrapper addLayout(Layout layout)
      Add a layout to the current page.
      Parameters:
      layout - the layout to add
      Returns:
      this book wrapper
    • addLine

      public BookWrapper addLine()
      Add a line to the current page.
      Returns:
      this book wrapper
    • addPlaceholder

      public BookWrapper addPlaceholder(String toReplace, String replaceWith)
      Add a placeholder to this book.
      Parameters:
      toReplace - the string to replace
      replaceWith - the replacement string
      Returns:
      this book wrapper
    • addToCurrentPage

      public BookWrapper addToCurrentPage(net.md_5.bungee.api.chat.BaseComponent... baseComponents)
      Add components to the current page.
      Parameters:
      baseComponents - the components to add
      Returns:
      this book wrapper
    • colorize

      public String colorize(String s)
      Colorize a string.
      Parameters:
      s - the string to colorize
      Returns:
      the colorized string
    • nextPage

      public BookWrapper nextPage(int newSize)
      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