#21 add return to auction house button to select listing type menu

This commit is contained in:
Kiran Hart 2022-11-25 13:27:16 -05:00
parent 963dd188db
commit a63067ce85
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
2 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,7 @@ package ca.tweetzy.auctionhouse.guis.sell;
import ca.tweetzy.auctionhouse.ahv3.api.ListingType;
import ca.tweetzy.auctionhouse.auction.AuctionPlayer;
import ca.tweetzy.auctionhouse.guis.AbstractPlaceholderGui;
import ca.tweetzy.auctionhouse.guis.GUIAuctionHouse;
import ca.tweetzy.auctionhouse.settings.Settings;
import ca.tweetzy.core.gui.GuiUtils;
import ca.tweetzy.flight.utils.QuickItem;
@ -55,6 +56,12 @@ public final class GUISellListingType extends AbstractPlaceholderGui {
drawAuctionButton(6);
drawBinButton(2);
}
setButton(getRows() - 1, 0, QuickItem
.of(Objects.requireNonNull(Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_ITEM.getMaterial().parseItem()))
.name(Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_NAME.getString())
.lore(Settings.GUI_SELL_LISTING_TYPE_ITEMS_RETURN_LORE.getStringList())
.make(), click -> click.manager.showGUI(click.player, new GUIAuctionHouse(this.auctionPlayer)));
}
private void drawAuctionButton(int col) {

View File

@ -878,6 +878,13 @@ public class Settings {
"&7Click to list as an &aAuction"
));
public static final ConfigSetting GUI_SELL_LISTING_TYPE_ITEMS_RETURN_ITEM = new ConfigSetting(config, "gui.sell listing type.items.return.item", XMaterial.BARRIER.name());
public static final ConfigSetting GUI_SELL_LISTING_TYPE_ITEMS_RETURN_NAME = new ConfigSetting(config, "gui.sell listing type.items.return.name", "&e&lAuction House");
public static final ConfigSetting GUI_SELL_LISTING_TYPE_ITEMS_RETURN_LORE = new ConfigSetting(config, "gui.sell listing type.items.return.lore", Arrays.asList(
"",
"&7Click to go to the &aAuction House"
));
/* ===============================
* ITEM SELL PLACE ITEM GUI
* ===============================*/