handBook.setAuthor(session.getPlayer().getName()); handBook.setTitle(book.getTitle()); handBook.setPages(book.getPages());
/** * Sets the author of the book * @param author the author of the book * @return the BookBuilder's calling instance */ public BookBuilder author(String author) { meta.setAuthor(author); return this; }
@Override public void setAuthor(String author) { bm.setAuthor(author); }
public static ItemStack sign(ItemStack mystack, String name) { if (mystack == null || mystack.getType() != Material.WRITABLE_BOOK) { return null; } mystack.setType(Material.WRITTEN_BOOK); final BookMeta mybook = (BookMeta) mystack.getItemMeta(); if (name != null) mybook.setAuthor(BookFile.prefix + "." + "name"); else mybook.setAuthor(BookFile.prefix); return mystack; } }
/** * Creates a new instance of the BookBuilder from an ItemStack representing the book item * @param book the book's ItemStack */ public BookBuilder(ItemStack book, String title, String author) { this.book = book; this.meta = (BookMeta)book.getItemMeta(); this.meta.setTitle(title); this.meta.setAuthor(author); }
String[] title = title_reward.split(" - "); meta.setTitle(title[0]); meta.setAuthor(author); meta.setPages(pages); book.setItemMeta(meta);
meta.setAuthor(datastore.getMessage(Messages.BookAuthor)); meta.setTitle(datastore.getMessage(Messages.BookTitle));
private ItemStack updateBook(CastContext context, Mage targetMage, ItemStack book) { BookMeta meta = (BookMeta) book.getItemMeta(); List<String> pages = replaceContents(context, targetMage); meta.setTitle(title); meta.setAuthor(author); meta.setPages(pages); book.setItemMeta(meta); return book; }
static private BookFile create(Inventory inventory, ItemStack mystack, int index, boolean binary, String name) { if (mystack == null || ! mystack.getType().equals(Material.WRITTEN_BOOK)) { mystack = new ItemStack(Material.WRITTEN_BOOK); } final BookMeta mybook = (BookMeta) Bukkit.getServer().getItemFactory().getItemMeta(Material.WRITTEN_BOOK); if (name != null) { final String myauthor = prefix + "." + name; mybook.setAuthor(myauthor); } else { mybook.setAuthor(prefix); } mystack.setItemMeta(mybook); inventory.setItem(index, mystack); return new BookFile(inventory, index, binary); }
BookMeta meta = (BookMeta) item.getItemMeta(); meta.setTitle(Utils.format(Config.getMessage(lang, "journal_title"))); meta.setAuthor(PlayerConverter.getPlayer(playerID).getName()); List<String> lore = new ArrayList<String>(); lore.add(Utils.format(Config.getMessage(lang, "journal_lore")));
ItemStack bookItem = new ItemStack(Material.WRITTEN_BOOK, count); BookMeta book = (BookMeta)bookItem.getItemMeta(); book.setAuthor(messages.get("books.default.author")); String title = null; if (category != null) {
bookMeta.setAuthor(player.getName()); bookMeta.setTitle(langBookName); bookMeta.setLore(
BookMeta book = (BookMeta)wand.getItem().getItemMeta(); book.setTitle(context.getMessage("title")); book.setAuthor(context.getMage().getName());
final BookMeta meta = (BookMeta) wiki.getItemMeta(); meta.setDisplayName(Lang.WIKI_NAME.get()); meta.setAuthor(Lang.WIKI_AUTHOR.get());
BookMeta bookMeta = (BookMeta) meta; bookMeta.setTitle(book.getTitle()); bookMeta.setAuthor(book.getAuthor()); bookMeta.setPages(book.getText());
book.setAuthor(ChatColor.DARK_PURPLE + "SERVER OWNER"); book.setTitle(ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead"); book.addPage(
meta.setAuthor(root.getString("book.author")); res.setItemMeta(meta);