mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-21 11:45:11 +01:00
open menu properly
This commit is contained in:
parent
92c76b642d
commit
e05d54300b
@ -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) {
|
||||
|
@ -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."));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user