mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-20 14:51:19 +01:00
🪲 fix bug where players can still cancel items with bids on them using the end all button
Took 4 minutes
This commit is contained in:
parent
71ce6eee64
commit
bf5803f342
@ -232,4 +232,8 @@ public class AuctionedItem {
|
||||
itemStack.setItemMeta(meta);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public boolean containsValidBid() {
|
||||
return isBidItem() && !this.highestBidder.equals(this.owner);
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,13 @@ public class GUIActiveAuctions extends AbstractPlaceholderGui {
|
||||
setButton(5, 4, getRefreshButtonItem(), e -> e.manager.showGUI(e.player, new GUIActiveAuctions(this.auctionPlayer)));
|
||||
|
||||
setButton(5, 1, ConfigurationItemHelper.createConfigurationItem(this.player, Settings.GUI_ACTIVE_AUCTIONS_ITEM.getString(), Settings.GUI_ACTIVE_AUCTIONS_NAME.getString(), Settings.GUI_ACTIVE_AUCTIONS_LORE.getStringList(), null), e -> {
|
||||
this.auctionPlayer.getItems(false).forEach(item -> item.setExpired(true));
|
||||
for (AuctionedItem item : this.auctionPlayer.getItems(false)) {
|
||||
if (Settings.SELLERS_MUST_WAIT_FOR_TIME_LIMIT_AFTER_BID.getBoolean() && item.containsValidBid())
|
||||
continue;
|
||||
|
||||
item.setExpired(true);
|
||||
}
|
||||
|
||||
draw();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user