start of confirm gui

This commit is contained in:
Kiran Hart 2021-03-18 01:03:37 -04:00
parent e96e362666
commit 46a8fb998e
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package ca.tweetzy.auctionhouse.guis;
import ca.tweetzy.auctionhouse.api.AuctionAPI;
import ca.tweetzy.auctionhouse.auction.AuctionItem;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.Gui;
import ca.tweetzy.core.utils.TextUtils;
/**
* The current file has been created by Kiran Hart
* Date Created: March 17 2021
* Time Created: 11:18 p.m.
* Usage of any code found within this class is prohibited unless given explicit permission otherwise
*/
public class GUIConfirmPurchase extends Gui {
final AuctionPlayer auctionPlayer;
final AuctionItem auctionItem;
public GUIConfirmPurchase(AuctionPlayer auctionPlayer, AuctionItem auctionItem) {
this.auctionPlayer = auctionPlayer;
this.auctionItem = auctionItem;
setTitle(TextUtils.formatText(Settings.GUI_CONFIRM_BUY_TITLE.getString()));
setRows(1);
setAcceptsItems(false);
draw();
}
private void draw() {
setItem(0, 4, AuctionAPI.getInstance().deserializeItem(this.auctionItem.getRawItem()));
}
}

View File

@ -172,6 +172,23 @@ public class Settings {
"&e&l%expired_player_auctions% Item(s)"
));
/* ===============================
* CONFIRM BUY GUI
* ===============================*/
public static final ConfigSetting GUI_CONFIRM_BUY_TITLE = new ConfigSetting(config, "gui.confirm buy.title", "&7Are you sure?");
public static final ConfigSetting GUI_CONFIRM_BUY_NO_ITEM = new ConfigSetting(config, "gui.confirm buy.no.item", "RED_STAINED_GLASS_PANE");
public static final ConfigSetting GUI_CONFIRM_BUY_NO_NAME = new ConfigSetting(config, "gui.confirm buy.no.name", "&c&LCancel");
public static final ConfigSetting GUI_CONFIRM_BUY_NO_LORE = new ConfigSetting(config, "gui.confirm buy.no.lore", Collections.singletonList(
"&7Click to cancel your purchase"
));
public static final ConfigSetting GUI_CONFIRM_BUY_YES_ITEM = new ConfigSetting(config, "gui.confirm buy.yes.item", "LIME_STAINED_GLASS_PANE");
public static final ConfigSetting GUI_CONFIRM_BUY_YES_NAME = new ConfigSetting(config, "gui.confirm buy.yes.name", "&a&lConfirm");
public static final ConfigSetting GUI_CONFIRM_BUY_YES_LORE = new ConfigSetting(config, "gui.confirm buy.yes.lore", Collections.singletonList(
"&7Click to confirm your purchase"
));
/* ===============================
* ACTIVE AUCTION GUI
* ===============================*/