/**
* Instantiates an ItemStack with a display name, lore, enchantments, and a cost for repairing.
*
* @param type material
* @param amount amount
* @param durability damage / durability
* @param displayName name of item
* @param lore lore for item
* @param enchantments enchantments for item
* @param cost experience level cost to repair
*/
public NonrepairableItemStack(Material type, int amount, short durability, String displayName,
List<String> lore,
Map<Enchantment, Integer> enchantments, int cost) {
super(type, amount, durability, displayName, lore, enchantments);
if (this.getItemMeta() instanceof Repairable) {
Repairable repairable = (Repairable) this.getItemMeta();
repairable.setRepairCost(cost);
setItemMeta((ItemMeta) repairable);
}
}
NonrepairableItemStack.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:MythicDrops
作者:
评论列表
文章目录