diff --git a/paper/src/main/java/com/badbones69/crazycrates/api/builders/ItemBuilder.java b/paper/src/main/java/com/badbones69/crazycrates/api/builders/ItemBuilder.java index bd19070c3..31c6150fc 100644 --- a/paper/src/main/java/com/badbones69/crazycrates/api/builders/ItemBuilder.java +++ b/paper/src/main/java/com/badbones69/crazycrates/api/builders/ItemBuilder.java @@ -3,7 +3,6 @@ import com.badbones69.crazycrates.CrazyCrates; import com.badbones69.crazycrates.api.enums.PersistentKeys; import com.badbones69.crazycrates.api.utils.MiscUtils; -import com.badbones69.crazycrates.api.utils.MsgUtils; import com.badbones69.crazycrates.support.SkullCreator; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.ryderbelserion.vital.enums.Support; @@ -240,13 +239,7 @@ public ItemBuilder(ItemStack itemStack) { case ENCHANTED_BOOK -> this.isBook = true; } - /*this.itemStack.editMeta(itemMeta -> { - if (itemMeta.hasDisplayName()) this.displayName = itemMeta.getDisplayName(); - - if (itemMeta.hasLore()) this.displayLore = itemMeta.getLore(); - });*/ - - String name = this.material.name(); + String name = this.material.getKey().getKey(); this.isArmor = name.endsWith("_helmet") || name.endsWith("_chestplate") || name.endsWith("_leggings") || name.endsWith("_boots"); @@ -273,13 +266,7 @@ public ItemBuilder(ItemStack itemStack, Player target) { case ENCHANTED_BOOK -> this.isBook = true; } - /*this.itemStack.editMeta(itemMeta -> { - if (itemMeta.hasDisplayName()) this.displayName = itemMeta.getDisplayName(); - - if (itemMeta.hasLore()) this.displayLore = itemMeta.getLore(); - });*/ - - String name = this.material.name(); + String name = this.material.getKey().getKey(); this.isArmor = name.endsWith("_helmet") || name.endsWith("_chestplate") || name.endsWith("_leggings") || name.endsWith("_boots");