From e15eea530df1ec16fda277251a83a782d85a5fbe Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Sat, 4 Jan 2025 21:34:44 -0500 Subject: [PATCH] don't add components if not needed --- .../crazyvouchers/api/objects/other/ItemBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paper/src/main/java/com/badbones69/crazyvouchers/api/objects/other/ItemBuilder.java b/paper/src/main/java/com/badbones69/crazyvouchers/api/objects/other/ItemBuilder.java index d23e078a..e0199e8e 100644 --- a/paper/src/main/java/com/badbones69/crazyvouchers/api/objects/other/ItemBuilder.java +++ b/paper/src/main/java/com/badbones69/crazyvouchers/api/objects/other/ItemBuilder.java @@ -920,7 +920,9 @@ private ItemBuilder setReferenceItem(ItemStack referenceItem) { * @return the ItemBuilder with an updated Boolean. */ public ItemBuilder setUnbreakable(boolean unbreakable) { - this.itemStack.setData(DataComponentTypes.UNBREAKABLE, Unbreakable.unbreakable(unbreakable)); + if (unbreakable) { + this.itemStack.setData(DataComponentTypes.UNBREAKABLE, Unbreakable.unbreakable().build().showInTooltip(true)); + } return this; }