From e05d54300b5050939929a97743f9d53814b1eb98 Mon Sep 17 00:00:00 2001 From: Ryder Belserion Date: Sat, 12 Oct 2024 17:24:28 -0400 Subject: [PATCH] open menu properly --- .../java/com/badbones69/crazyauctions/api/GuiManager.java | 8 ++++---- .../badbones69/crazyauctions/commands/AuctionCommand.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/paper/src/main/java/com/badbones69/crazyauctions/api/GuiManager.java b/paper/src/main/java/com/badbones69/crazyauctions/api/GuiManager.java index 6a0426a..641cb5d 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/api/GuiManager.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/GuiManager.java @@ -7,8 +7,8 @@ import com.badbones69.crazyauctions.api.guis.types.AuctionsMenu; import com.badbones69.crazyauctions.api.guis.types.CategoriesMenu; import com.badbones69.crazyauctions.api.guis.types.CurrentMenu; import com.badbones69.crazyauctions.api.guis.types.ExpiredMenu; -import com.badbones69.crazyauctions.api.guis.types.transactions.BidMenu; -import com.badbones69.crazyauctions.api.guis.types.transactions.BuyingMenu; +import com.badbones69.crazyauctions.api.guis.types.other.BidMenu; +import com.badbones69.crazyauctions.api.guis.types.other.BuyingMenu; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; @@ -29,7 +29,7 @@ public class GuiManager { public static void openPlayersCurrentList(Player player, int page) { FileConfiguration config = Files.config.getConfiguration(); - new CurrentMenu(player, config.getString("Settings.Players-Current-Items", "N/A"), 54, page); + new CurrentMenu(player, config.getString("Settings.Players-Current-Items", "N/A"), 54, page).build(); } public static void openPlayersExpiredList(Player player, int page) { @@ -47,7 +47,7 @@ public class GuiManager { public static void openBidding(Player player, String ID) { FileConfiguration config = Files.config.getConfiguration(); - new BidMenu(player, ID, config.getString("Settings.Bidding-On-Item")); + new BidMenu(player, ID, config.getString("Settings.Bidding-On-Item")).build(); } public static void openViewer(Player player, String other, int page) { diff --git a/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java index 0491a03..5013e99 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java @@ -8,8 +8,8 @@ import com.badbones69.crazyauctions.api.enums.misc.Files; import com.badbones69.crazyauctions.api.enums.Messages; import com.badbones69.crazyauctions.api.enums.ShopType; import com.badbones69.crazyauctions.api.events.AuctionListEvent; -import com.badbones69.crazyauctions.api.guis.types.AuctionsMenu; import com.badbones69.crazyauctions.api.GuiManager; +import com.badbones69.crazyauctions.tasks.InventoryManager; import com.ryderbelserion.vital.paper.api.files.FileManager; import org.bukkit.Material; import org.bukkit.command.Command; @@ -59,9 +59,9 @@ public class AuctionCommand implements CommandExecutor { } if (this.crazyManager.isSellingEnabled()) { - new AuctionsMenu(player, ShopType.SELL, Category.NONE, config.getString("Settings.GUIName", "N/A"), 54, 1).build(); + GuiManager.openShop(player, ShopType.SELL, Category.NONE, 1); } else if (this.crazyManager.isBiddingEnabled()) { - new AuctionsMenu(player, ShopType.BID, Category.NONE, config.getString("Settings.GUIName", "N/A"), 54, 1).build(); + GuiManager.openShop(player, ShopType.BID, Category.NONE, 1); } else { player.sendMessage(Methods.getPrefix() + Methods.color("&cThe bidding and selling options are both disabled. Please contact the admin about this.")); }