mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-21 05:15:11 +01:00
🔢 Added unique min/max price options w/lang options for requests. Closes #100
Took 3 minutes
This commit is contained in:
parent
9540c3ad61
commit
5efa6773ae
@ -140,12 +140,12 @@ public class CommandRequest extends Command {
|
||||
final double price = Double.parseDouble(args[0]);
|
||||
|
||||
if (price < Settings.MIN_AUCTION_PRICE.getDouble()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.minbaseprice").processPlaceholder("price", Settings.MIN_AUCTION_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.request.min price").processPlaceholder("price", Settings.MIN_REQUEST_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
return ReturnType.FAIL;
|
||||
}
|
||||
|
||||
if (price > Settings.MAX_AUCTION_PRICE.getDouble()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.maxbaseprice").processPlaceholder("price", Settings.MIN_AUCTION_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.request.max price").processPlaceholder("price", Settings.MAX_REQUEST_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
return ReturnType.FAIL;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,6 @@ public final class CommandSell extends Command {
|
||||
boolean isStackPrice = false;
|
||||
boolean partialBuy = false;
|
||||
boolean serverAuction = false;
|
||||
boolean isRequest = false;
|
||||
|
||||
List<String> timeSets = Arrays.asList(
|
||||
"second",
|
||||
|
@ -109,6 +109,10 @@ public class LocaleSettings {
|
||||
languageNodes.put("general.priority boost.boosted", "&aSuccessfully boosted this item to the top of the Auction House");
|
||||
languageNodes.put("general.priority boost.already boosted", "&cThis item already has priority listing");
|
||||
|
||||
languageNodes.put("pricing.request.min price", "&cThe minimum request price must be &a%price%");
|
||||
languageNodes.put("pricing.request.max price", "&cThe maximum request price is &a%price%");
|
||||
|
||||
|
||||
languageNodes.put("pricing.minbaseprice", "&cThe minimum base price must be &a%price%");
|
||||
languageNodes.put("pricing.minstartingprice", "&cThe minimum starting bid price must be &a%price%");
|
||||
languageNodes.put("pricing.minbidincrementprice", "&cThe minimum bid increment must be &a%price%");
|
||||
|
@ -116,6 +116,8 @@ public class Settings {
|
||||
public static final ConfigSetting OWNER_CAN_FULFILL_OWN_REQUEST = new ConfigSetting(config, "auction setting.purchase.owner can fulfill own request", false, "Should the owner of a request be able to fulfill it", "This probably should be set to false...");
|
||||
public static final ConfigSetting MAX_REQUEST_AMOUNT = new ConfigSetting(config, "auction setting.max request amount", 64, "How much of an item should a player be able to ask for in a single request?");
|
||||
public static final ConfigSetting BLOCK_REQUEST_USING_FILLED_SHULKER = new ConfigSetting(config, "auction setting.block requests using filled shulkers", true, "If false, players can request make a request using a shulker that contains items");
|
||||
public static final ConfigSetting MIN_REQUEST_PRICE = new ConfigSetting(config, "auction setting.pricing.min request price", 1, "The minimum price for a request");
|
||||
public static final ConfigSetting MAX_REQUEST_PRICE = new ConfigSetting(config, "auction setting.pricing.max request price", 1000000000, "The maximum price for a request");
|
||||
|
||||
|
||||
public static final ConfigSetting AUTO_REFRESH_AUCTION_PAGES = new ConfigSetting(config, "auction setting.auto refresh auction pages", true, "Should auction pages auto refresh?");
|
||||
|
Loading…
Reference in New Issue
Block a user