mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-22 11:55:12 +01:00
update keys
This commit is contained in:
parent
2825787e7e
commit
2ee5286b54
@ -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;
|
||||
|
@ -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"));
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user