Class Book

java.lang.Object
nl.minetopiasdb.api.Book

public class Book extends Object
Class used to interact with books
  • Constructor Details

    • Book

      public Book(String name)
  • Method Details

    • getBooks

      public static List<Book> getBooks()
      Get a list of all the available books
      Returns:
      list of all the books
    • getBook

      public static Book getBook(String name)
    • getName

      public String getName()
      Get the config-key (ugly name) of the book.
      Returns:
      the config key for the book.
    • getItemName

      public String getItemName()
      Get the book item name (with variables) for this book.
      Returns:
      book item name
    • getPrettyName

      public String getPrettyName(org.bukkit.entity.Player p)
      Get the pretty name of this book
      Parameters:
      p - player needed for replacing the player-based variables
      Returns:
      the pretty name of the book
    • getDescription

      public String getDescription(org.bukkit.entity.Player p)
      Get the description of this book
      Parameters:
      p - player needed for replacing the player-based variables
      Returns:
      the description of the book
    • getPermission

      public String getPermission()
      The permission-node that is required for interacting with this book.
      Returns:
      the permission for this book.
    • getMaterial

      public org.bukkit.Material getMaterial()
      The inventory material for this book (as given in the config) used for /boek open
      Returns:
      bukkit material for the book
    • getText

      public String getText()
      The text of this book without any of the variables replaced
      Returns:
      book contents
    • getVariables

      public List<Book.Variable> getVariables()
      All the non-replaced variables of the book
      Returns:
      a list of the variables
    • isCopyEnabled

      public boolean isCopyEnabled()
      If true, you'll receive 2 books when completed.
      Returns:
      if you get a copy
    • start

      public void start(org.bukkit.entity.Player player)
      Start the book creation process
      Parameters:
      player - Player who needs to type all the variables.