🟥🟩 Added option to disable buy out by default in auction sell menu. Closes #31, also Closes #28 from previous commit

Took 4 minutes

Took 18 seconds
This commit is contained in:
Kiran Hart 2023-04-28 12:06:14 -04:00
parent 32531c548c
commit b20443feff
No known key found for this signature in database
GPG Key ID: 5F36C7BC79D3EBC3
2 changed files with 10 additions and 2 deletions

View File

@ -98,15 +98,22 @@ public final class GUISellPlaceItem extends AbstractPlaceholderGui {
if (this.listingType == ListingType.BIN)
click.manager.showGUI(click.player, new GUISellBin(this.auctionPlayer, Settings.MIN_AUCTION_PRICE.getDouble(), this.auctionPlayer.getAllowedSellTime(AuctionSaleType.WITHOUT_BIDDING_SYSTEM), false));
else
else {
boolean buyOutOnByDefault = Settings.ALLOW_USAGE_OF_BUY_NOW_SYSTEM.getBoolean();
if (Settings.BUY_NOW_DISABLED_BY_DEFAULT_IN_SELL_MENU.getBoolean()) {
buyOutOnByDefault = false;
}
click.manager.showGUI(click.player, new GUISellAuction(
this.auctionPlayer,
Settings.MIN_AUCTION_PRICE.getDouble(),
Settings.MIN_AUCTION_START_PRICE.getDouble(),
Settings.MIN_AUCTION_INCREMENT_PRICE.getDouble(),
this.auctionPlayer.getAllowedSellTime(AuctionSaleType.USED_BIDDING_SYSTEM),
Settings.ALLOW_USAGE_OF_BUY_NOW_SYSTEM.getBoolean()
buyOutOnByDefault
));
}
});
if (Settings.ALLOW_ITEM_BUNDLES.getBoolean()) {

View File

@ -118,6 +118,7 @@ public class Settings {
public static final ConfigSetting PLAYER_NEEDS_TOTAL_PRICE_TO_BID = new ConfigSetting(config, "auction setting.bidder must have funds in account", false, "Should the player who is placing a bid on an item have the money in their account to cover the cost?");
public static final ConfigSetting ALLOW_USAGE_OF_BID_SYSTEM = new ConfigSetting(config, "auction setting.allow bid system usage", true, "Should players be allowed to use the bid option cmd params?");
public static final ConfigSetting ALLOW_USAGE_OF_BUY_NOW_SYSTEM = new ConfigSetting(config, "auction setting.allow buy now system usage", true, "Should players be allowed to use the right-click buy now feature on biddable items?");
public static final ConfigSetting BUY_NOW_DISABLED_BY_DEFAULT_IN_SELL_MENU = new ConfigSetting(config, "auction setting.buy now disabled in sell menu by default", false, "If true, players will just need to toggle buy now on their items to allow buy now");
public static final ConfigSetting AUTO_SAVE_ENABLED = new ConfigSetting(config, "auction setting.auto save.enabled", true, "Should the auto save task be enabled?");
public static final ConfigSetting AUTO_SAVE_EVERY = new ConfigSetting(config, "auction setting.auto save.time", 900, "How often should the auto save active? (in seconds. Ex. 900 = 15min)");
public static final ConfigSetting ALLOW_PURCHASE_OF_SPECIFIC_QUANTITIES = new ConfigSetting(config, "auction setting.allow purchase of specific quantities", false, "When a buy now item is right-clicked should it open a", "special gui to specify the quantity of items to buy from the stack?");