Class Book
java.lang.Object
net.gcnt.additionsplus.files.books.Book
Class that contains all information of a specific custom book.
-
Constructor Summary
ConstructorDescriptionBook(String name, String author, String title, String generation, int slot, String displayName, List<String> lore, List<String> pages, List<ItemOption> itemOptions, HashMap<org.bukkit.enchantments.Enchantment,Integer> enchantments, List<org.bukkit.inventory.ItemFlag> itemFlags)
-
Method Summary
Modifier and TypeMethodDescriptionGet the author of the book.static Book
getBookByName(String name)
Search a book by its identifier.Get the identifier of the book.Deprecated.Get a list of enchantments, and their strengths, that this book has.Get the generation of the book.List<org.bukkit.inventory.ItemFlag>
Get a list of item flags that this book has.Get a list of item options that this book has.getLore()
Deprecated.getName()
Get the identifier of the book.getPages()
Get a list of pages from this book.int
getSlot()
Get the slot to put this book in.getTitle()
Get the title of the book.void
giveBook(org.bukkit.entity.Player player)
Give the custom book to a player.
-
Constructor Details
-
Book
-
-
Method Details
-
getBookByName
Search a book by its identifier. -
getItemFlags
Get a list of item flags that this book has.- Returns:
- List of ItemFlags.
-
getEnchantments
Get a list of enchantments, and their strengths, that this book has.- Returns:
- HashMap with Enchantments and their
Integer
strengths.
-
getItemOptions
Get a list of item options that this book has.- Returns:
- List of
ItemOption
.
-
getName
Get the identifier of the book.- Returns:
String
identifier of the book.
-
getBookName
Get the identifier of the book.- Returns:
String
identifier of the book.
-
getAuthor
Get the author of the book.- Returns:
String
author of the book.
-
getTitle
Get the title of the book.- Returns:
String
title of the book.
-
getGeneration
Get the generation of the book.- Returns:
String
generation of the book.
-
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.Get the display name of the book.- Returns:
String
display name of the book.
-
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.
-