Skip to content

Commit

Permalink
add GuiItem(String)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oribuin committed Nov 25, 2024
1 parent f2f468e commit 1ab7ae8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/main/java/xyz/oribuin/fishing/api/gui/GuiItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ public class GuiItem implements Configurable {
protected List<Integer> 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
*
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/xyz/oribuin/fishing/gui/StatsMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1ab7ae8

Please sign in to comment.