/**
* Get the final {@link ItemStack} with all the attributes you have been adding
*
* @return the {@link ItemStack} of this {@link ItemBuilder}
*/
@Override
public ItemStack build() {
ItemStack s = new ItemStack(this.getMaterial());
s.setAmount(this.getAmount());
s.setDurability(this.getDamage());
LeatherArmorMeta m = (LeatherArmorMeta) s.getItemMeta();
for (ItemFlag iflag : this.getAllItemflags()) {
m.addItemFlags(iflag);
}
m.setDisplayName(this.getName());
m.setLore(this.getLore());
m.setColor(color);
s.setItemMeta(m);
for (Map.Entry<Enchantment, Integer> temp : this.getAllEnchantments().entrySet()) {
s.addUnsafeEnchantment(temp.getKey(), temp.getValue());
}
return s;
}
LeatherItemBuilder.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:AlphaLibary
作者:
评论列表
文章目录