From 1ab7ae8fe4e30f9f3690db3de683d88e6cae6e55 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 25 Nov 2024 19:05:56 +0000 Subject: [PATCH] add GuiItem(String) --- src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java | 7 +++++++ src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java b/src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java index 58e2aa4..d7bd208 100644 --- a/src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java +++ b/src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java @@ -20,6 +20,13 @@ public class GuiItem implements Configurable { protected List slot = List.of(0); protected ItemConstruct item = ItemConstruct.EMPTY; + public GuiItem() { + } + + public GuiItem(String name) { + this.name = name; + } + /** * Place the item in the specified slot in the GUI * diff --git a/src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java b/src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java index 7265a8c..8bc4f20 100644 --- a/src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java +++ b/src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java @@ -56,9 +56,9 @@ public void saveSettings(@NotNull CommentedConfigurationSection config) { // Default OPTIONS :DDD CommentedConfigurationSection items = this.pullSection(config, "items"); - CommentedConfigurationSection item = this.pullSection(items, "1.stats"); + CommentedConfigurationSection item = this.pullSection(items, "1"); - GuiItem statsItem = new GuiItem(); + GuiItem statsItem = new GuiItem("stats"); ItemConstruct construct = ItemConstruct.of(Material.PLAYER_HEAD) .name("&f&lUser Stats") .lore(