mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-21 05:15:11 +01:00
🔨 fixed request minimum/maximum prices using incorrect values. Closes #102
Took 2 minutes
This commit is contained in:
parent
5539088f16
commit
8b4736fd67
@ -107,7 +107,7 @@ public class CommandRequest extends Command {
|
||||
}
|
||||
|
||||
if (args.length < 1) {
|
||||
AuctionHouse.getGuiManager().showGUI(player, new GUIRequestItem(auctionPlayer, originalItem, originalItem.getAmount(), 1));
|
||||
AuctionHouse.getGuiManager().showGUI(player, new GUIRequestItem(auctionPlayer, originalItem, originalItem.getAmount(), Settings.MIN_REQUEST_PRICE.getDouble()));
|
||||
return ReturnType.SUCCESS;
|
||||
}
|
||||
|
||||
@ -137,12 +137,12 @@ public class CommandRequest extends Command {
|
||||
// check min/max prices
|
||||
final double price = Double.parseDouble(args[0]);
|
||||
|
||||
if (price < Settings.MIN_AUCTION_PRICE.getDouble()) {
|
||||
if (price < Settings.MIN_REQUEST_PRICE.getDouble()) {
|
||||
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()) {
|
||||
if (price > Settings.MAX_REQUEST_PRICE.getDouble()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.request.max price").processPlaceholder("price", Settings.MAX_REQUEST_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
return ReturnType.FAIL;
|
||||
}
|
||||
|
@ -138,11 +138,16 @@ public final class GUIRequestItem extends AuctionBaseGUI {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newPrice > Settings.MAX_AUCTION_PRICE.getDouble()) {
|
||||
if (newPrice > Settings.MAX_REQUEST_PRICE.getDouble()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.request.max price").processPlaceholder("price", Settings.MAX_REQUEST_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newPrice < Settings.MIN_REQUEST_PRICE.getDouble()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("pricing.request.min price").processPlaceholder("price", Settings.MIN_REQUEST_PRICE.getDouble()).sendPrefixedMessage(player);
|
||||
return false;
|
||||
}
|
||||
|
||||
click.manager.showGUI(click.player, new GUIRequestItem(
|
||||
GUIRequestItem.this.auctionPlayer,
|
||||
GUIRequestItem.this.itemRequested,
|
||||
|
Loading…
Reference in New Issue
Block a user