handBook.setTitle(book.getTitle()); handBook.setPages(book.getPages()); inHand.setType(Material.WRITTEN_BOOK);
/** * Sets the title of the book * @param title the title of the book * @return the BookBuilder's calling instance */ public BookBuilder title(String title) { meta.setTitle(title); return this; }
@Override public boolean setTitle(String title) { return bm.setTitle(title); }
/** * 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); }
BookMeta meta = (BookMeta) book.getItemMeta(); String[] title = title_reward.split(" - "); meta.setTitle(title[0]); meta.setAuthor(author); meta.setPages(pages);
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; }
meta.setTitle(Utils.format(Config.getMessage(lang, "journal_title"))); meta.setAuthor(PlayerConverter.getPlayer(playerID).getName()); List<String> lore = new ArrayList<String>();
title = messages.get("books.all.title"); book.setTitle(title); List<String> pages = new ArrayList<>();
book.setTitle(context.getMessage("title")); book.setAuthor(context.getMage().getName());
bookMeta.setTitle(langBookName); bookMeta.setLore( Arrays.asList(StringUtils.replaceOnce(langBookDate, "DATE", dateFormat.format(System.currentTimeMillis()))));
bookMeta.setTitle(book.getTitle()); bookMeta.setAuthor(book.getAuthor()); bookMeta.setPages(book.getText());
book.setTitle(ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead"); book.addPage( ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead\n"
meta.addPage(sub.getString("")); meta.setTitle(root.getString("book.title")); meta.setAuthor(root.getString("book.author")); res.setItemMeta(meta);