From 2dfaa290e1192a314fabd9ddf237013221ffb563 Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Fri, 11 Oct 2024 16:58:01 -0400 Subject: [PATCH] add method to itembuilder --- .../crazyauctions/api/builders/ItemBuilder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java b/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java index 5714205..2e08a03 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java @@ -730,6 +730,16 @@ public class ItemBuilder { return this; } + public ItemBuilder addInteger(int value) { + this.itemStack.editMeta(itemMeta -> { + PersistentDataContainer container = itemMeta.getPersistentDataContainer(); + + container.set(Keys.auction_price.getNamespacedKey(), PersistentDataType.INTEGER, value); + }); + + return this; + } + /** * Set the lore of the item with papi support in the builder. This will auto force color in all the lores that contains color code. (&a, &c, &7, etc...) *