Exemple #1
0
 public static ItemStack getSpelltome(Spell spell) {
   ItemStack i = new ItemStack(Material.BOOK);
   BookMeta m = (BookMeta) i.getItemMeta();
   List<String> l = new ArrayList<String>();
   l.add(ChatColor.GRAY + "" + spell);
   m.setLore(l);
   m.setTitle(spell.name());
   m.addPage(
       spell.bookText()
           + "\n\n"
           + ChatColor.getByChar("0")
           + "Cast the spell with:\n"
           + ChatColor.getByChar("9")
           + "/cast "
           + spell
           + "\n\n"
           + ChatColor.getByChar("0")
           + "Learn this spell by left clicking this book!");
   i.setItemMeta(m);
   i.addEnchantment(Zephyrus.getInstance().glow, 1);
   return i;
 }