open menu properly

This commit is contained in:
Ryder Belserion 2024-10-12 17:24:28 -04:00
parent 92c76b642d
commit e05d54300b
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View File

@ -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) {

View File

@ -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."));
}