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 2e08a03..711b0eb 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 @@ -718,23 +718,23 @@ public class ItemBuilder { return this; } - public ItemBuilder addString(String name) { + public ItemBuilder addString(String name, NamespacedKey key) { if (name.isEmpty()) return this; this.itemStack.editMeta(itemMeta -> { PersistentDataContainer container = itemMeta.getPersistentDataContainer(); - container.set(Keys.auction_button.getNamespacedKey(), PersistentDataType.STRING, name); + container.set(key, PersistentDataType.STRING, name); }); return this; } - public ItemBuilder addInteger(int value) { + public ItemBuilder addInteger(int value, NamespacedKey key) { this.itemStack.editMeta(itemMeta -> { PersistentDataContainer container = itemMeta.getPersistentDataContainer(); - container.set(Keys.auction_price.getNamespacedKey(), PersistentDataType.INTEGER, value); + container.set(key, PersistentDataType.INTEGER, value); }); return this; diff --git a/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CategoriesMenu.java b/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CategoriesMenu.java index c7f28d0..770ee92 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CategoriesMenu.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CategoriesMenu.java @@ -65,7 +65,7 @@ public class CategoriesMenu extends Holder { String name = this.config.getString("Settings.GUISettings." + key + ".Name"); int slot = this.config.getInt("Settings.GUISettings." + key + ".Slot"); - ItemBuilder itemBuilder = new ItemBuilder().setMaterial(id).setName(name).addString(key).setAmount(1); + ItemBuilder itemBuilder = new ItemBuilder().setMaterial(id).setName(name).addString(key, Keys.auction_button.getNamespacedKey()).setAmount(1); if (this.config.contains("Settings.GUISettings." + key + ".Lore")) { itemBuilder.setLore(this.config.getStringList("Settings.GUISettings." + key + ".Lore")); diff --git a/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CurrentMenu.java b/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CurrentMenu.java index e4eafb6..c870726 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CurrentMenu.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/guis/types/CurrentMenu.java @@ -74,7 +74,7 @@ public class CurrentMenu extends Holder { String name = this.config.getString("Settings.GUISettings.OtherSettings." + key + ".Name"); int slot = this.config.getInt("Settings.GUISettings.OtherSettings." + key + ".Slot"); - ItemBuilder itemBuilder = new ItemBuilder().setMaterial(id).setName(name).addString(key).setAmount(1); + ItemBuilder itemBuilder = new ItemBuilder().setMaterial(id).setName(name).addString(key, Keys.auction_button.getNamespacedKey()).setAmount(1); if (this.config.contains("Settings.GUISettings.OtherSettings." + key + ".Lore")) { itemBuilder.setLore(this.config.getStringList("Settings.GUISettings.OtherSettings." + key + ".Lore"));