public ItemStack build() {
Material mat = this.mat;
if (mat == null) {
mat = Material.AIR;
Bukkit.getLogger().warning("Null material!");
}
ItemStack item = new ItemStack(this.mat, this.amount, this.data);
ItemMeta meta = item.getItemMeta();
if (this.title != null) {
meta.setDisplayName(this.title);
}
if (!this.lore.isEmpty()) {
meta.setLore(this.lore);
}
if (meta instanceof LeatherArmorMeta) {
((LeatherArmorMeta) meta).setColor(this.color);
}
item.setItemMeta(meta);
item.addUnsafeEnchantments(this.enchants);
if (this.potion != null) {
this.potion.apply(item);
}
return item;
}
ItemBuilder.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:MiniMiniGames
作者:
评论列表
文章目录