SpellTome.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:MystiCraft 作者:
public static ItemStack getSpellTome(String label, Player crafter) {
    ItemStack i = new ItemStack(MATERIAL);
    Spell spell = MystiCraft.getSpellManager().getSpell(label);
    BookMeta meta = (BookMeta)i.getItemMeta();
    meta.setDisplayName(DISPLAY_NAME + StringUtils.capitalize(label));
    if (crafter != null)
        meta.setAuthor(crafter.getName());
    else
        meta.setAuthor("unknown");
    meta.setGeneration(Generation.TATTERED);
    meta.setLore(Arrays.asList(new String[]{ChatColor.GRAY + spell.getDescription(), ChatColor.GRAY + "Mana Cost: " + spell.getManaCost()}));
    // TODO Add description
    meta.addPage("-------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
    i.setItemMeta(meta);
    return i;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号