java.lang.Object
net.gcnt.additionsplus.files.books.Book

public class Book extends Object
Class that contains all information of a specific custom book.
  • Constructor Details

  • Method Details

    • getBookByName

      public static Book getBookByName(String name)
      Search a book by its identifier.
      Parameters:
      name - String identifier of the book.
      Returns:
      Book when found, null when invalid.
    • getItemFlags

      public List<org.bukkit.inventory.ItemFlag> getItemFlags()
      Get a list of item flags that this book has.
      Returns:
      List of ItemFlags.
    • getEnchantments

      public HashMap<org.bukkit.enchantments.Enchantment,​Integer> getEnchantments()
      Get a list of enchantments, and their strengths, that this book has.
      Returns:
      HashMap with Enchantments and their Integer strengths.
    • getItemOptions

      public List<ItemOption> getItemOptions()
      Get a list of item options that this book has.
      Returns:
      List of ItemOption.
    • getName

      public String getName()
      Get the identifier of the book.
      Returns:
      String identifier of the book.
    • getBookName

      public String getBookName()
      Get the identifier of the book.
      Returns:
      String identifier of the book.
    • getAuthor

      public String getAuthor()
      Get the author of the book.
      Returns:
      String author of the book.
    • getTitle

      public String getTitle()
      Get the title of the book.
      Returns:
      String title of the book.
    • getGeneration

      public String getGeneration()
      Get the generation of the book.
      Returns:
      String generation of the book.
    • getPages

      public List<String> getPages()
      Get a list of pages from this book.
      Returns:
      String list of pages this book has.
    • getSlot

      public int getSlot()
      Get the slot to put this book in.
      Returns:
      Integer inventory slot if set, -1 by default.
    • getDisplayName

      @Deprecated public String getDisplayName()
      Deprecated.
      Get the display name of the book.
      Returns:
      String display name of the book.
    • getLore

      @Deprecated public List<String> getLore()
      Deprecated.
      Get the lore of the book.
      Returns:
      List String lore of the book.
    • giveBook

      public void giveBook(org.bukkit.entity.Player player)
      Give the custom book to a player.
      Parameters:
      player - Player to give the book to.