From 1b59e45314afe0bf4df2b4900efb07743ab40100 Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Thu, 25 Apr 2024 18:42:35 -0400 Subject: [PATCH] Fix the itembuilder --- .../crazycrates/api/builders/ItemBuilder.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) 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");