mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-22 05:25:11 +01:00
🐛fixed bug where users can bypass sell limit when using the list button within the main gui
Took 3 minutes Took 4 minutes
This commit is contained in:
parent
e0e2d1c20f
commit
fc6574efb9
@ -299,13 +299,11 @@ public final class CommandSell extends AbstractCommand {
|
||||
}
|
||||
|
||||
// update the listing time to the max allowed time if it wasn't set using the command flag
|
||||
// allowedTime = allowedTime != 0 ? allowedTime : auctionPlayer.getAllowedSellTime(
|
||||
// buyNowPrice != null && startingBid != null ?
|
||||
// /*isBiddingItem ?*/ AuctionSaleType.USED_BIDDING_SYSTEM : AuctionSaleType.WITHOUT_BIDDING_SYSTEM
|
||||
// );
|
||||
allowedTime = allowedTime != 0 ? allowedTime : auctionPlayer.getAllowedSellTime(
|
||||
isBiddingItem ? AuctionSaleType.USED_BIDDING_SYSTEM : AuctionSaleType.WITHOUT_BIDDING_SYSTEM
|
||||
);
|
||||
|
||||
|
||||
allowedTime = allowedTime != 0 ? allowedTime : auctionPlayer.getAllowedSellTime(AuctionSaleType.WITHOUT_BIDDING_SYSTEM);
|
||||
Bukkit.broadcastMessage(""+allowedTime);
|
||||
|
||||
// Check list delay
|
||||
if (!auctionPlayer.canListItem()) {
|
||||
|
@ -526,8 +526,13 @@ public class GUIAuctionHouse extends AbstractPlaceholderGui {
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUISellListingType(auctionPlayer, selected -> {
|
||||
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUISellPlaceItem(auctionPlayer, GUISellPlaceItem.ViewMode.SINGLE_ITEM, selected));
|
||||
if (this.auctionPlayer.isAtSellLimit()) {
|
||||
AuctionHouse.getInstance().getLocale().getMessage("general.sellinglimit").sendPrefixedMessage(player);
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUISellListingType(this.auctionPlayer, selected -> {
|
||||
AuctionHouse.getInstance().getGuiManager().showGUI(player, new GUISellPlaceItem(this.auctionPlayer, GUISellPlaceItem.ViewMode.SINGLE_ITEM, selected));
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user