Add a bidding system (/ah bid) alongside the classic fixed-price auction - #31
Open
Florianpal1 wants to merge 2 commits into
Open
Add a bidding system (/ah bid) alongside the classic fixed-price auction#31Florianpal1 wants to merge 2 commits into
Florianpal1 wants to merge 2 commits into
Conversation
Florianpal1
commented
Aug 15, 2026
Owner
- New independent sale type : a player starts a bid with /ah bid , other players raise it through a dedicated BidsGui/BidConfirmGui, and the highest bid wins when its own end date (bid.expiration.time, separate from the classic auction's expiration.time) is reached. /ah bid list opens the bid house, /ah bid cancel withdraws a bid that has not received any offer yet.
- Bid/BidHistoric objects, BidQueries/BidHistoricQueries and BidCommandManager/BidHistoricCommandManager mirror the existing Auction/Historic/AuctionCommandManager stack (raw JDBC, SQLite cache advanced only once the database write is confirmed, database-assigned ids only) but stay independent from it : a bid's price and bidder mutate over time, which Auction's model does not support.
- Economy is escrow-based : the bidder is debited the moment a raise is accepted, before the bid row itself is updated, and refunded automatically (including offline, through the existing pending-currency queue) as soon as someone outbids them. BidSchedule pays the seller only after the item has been confirmed delivered to the winner (or parked in the expired items if they are offline), so a delivery failure and its automatic retry can never pay the seller twice.
- New "bid" section in config.yml : its own duration/check period, its own minimum raise (floored above zero), its own per-rank cap, and a toggle to decide whether the classic min/max price bounds apply to a bid's start price (off by default).
- AbstractGuiConfig/AbstractGui gained a bidGui block type so any menu (including the classic auction house, which now has a shortcut to it) can open the bid house ; ClaimManager gained a bid-only per-player claim so starting a sale and starting a bid never block each other.
- New MessageKeys/events (BidAddEvent, BidPlaceEvent, BidWonEvent, BidCancelEvent) and permissions (fauction.bid, fauction.mod.bid.cancel, fauction.admin.purge.bid), translated in all four language files.
- Moderator cancellation of a bid now requires shift-click and returns the item to the seller through the expired items, exactly like the classic auction's moderator cancel, instead of confiscating it into the moderator's own inventory.
- Added unit tests for BidCommandManager (concurrent finalizers, stale-bid rejection, restore/refinalize, the SQLite-shutdown save re-applying the current bidder instead of erasing it), BidSchedule's expiry check, the new config section, and the bid-specific command validation.
- New independent sale type : a player starts a bid with /ah bid <startPrice>, other players raise it through a dedicated BidsGui/BidConfirmGui, and the highest bid wins when its own end date (bid.expiration.time, separate from the classic auction's expiration.time) is reached. /ah bid list opens the bid house, /ah bid cancel withdraws a bid that has not received any offer yet. - Bid/BidHistoric objects, BidQueries/BidHistoricQueries and BidCommandManager/BidHistoricCommandManager mirror the existing Auction/Historic/AuctionCommandManager stack (raw JDBC, SQLite cache advanced only once the database write is confirmed, database-assigned ids only) but stay independent from it : a bid's price and bidder mutate over time, which Auction's model does not support. - Economy is escrow-based : the bidder is debited the moment a raise is accepted, before the bid row itself is updated, and refunded automatically (including offline, through the existing pending-currency queue) as soon as someone outbids them. BidSchedule pays the seller only after the item has been confirmed delivered to the winner (or parked in the expired items if they are offline), so a delivery failure and its automatic retry can never pay the seller twice. - New "bid" section in config.yml : its own duration/check period, its own minimum raise (floored above zero), its own per-rank cap, and a toggle to decide whether the classic min/max price bounds apply to a bid's start price (off by default). - AbstractGuiConfig/AbstractGui gained a bidGui block type so any menu (including the classic auction house, which now has a shortcut to it) can open the bid house ; ClaimManager gained a bid-only per-player claim so starting a sale and starting a bid never block each other. - New MessageKeys/events (BidAddEvent, BidPlaceEvent, BidWonEvent, BidCancelEvent) and permissions (fauction.bid, fauction.mod.bid.cancel, fauction.admin.purge.bid), translated in all four language files. - Moderator cancellation of a bid now requires shift-click and returns the item to the seller through the expired items, exactly like the classic auction's moderator cancel, instead of confiscating it into the moderator's own inventory. - Added unit tests for BidCommandManager (concurrent finalizers, stale-bid rejection, restore/refinalize, the SQLite-shutdown save re-applying the current bidder instead of erasing it), BidSchedule's expiry check, the new config section, and the bid-specific command validation.
- New independent sale type : a player starts a bid with /ah bid <startPrice>, other players raise it through a dedicated BidsGui/BidConfirmGui, and the highest bid wins when its own end date (bid.expiration.time, separate from the classic auction's expiration.time) is reached. /ah bid list opens the bid house, /ah bid cancel withdraws a bid that has not received any offer yet. - Bid/BidHistoric objects, BidQueries/BidHistoricQueries and BidCommandManager/BidHistoricCommandManager mirror the existing Auction/Historic/AuctionCommandManager stack (raw JDBC, SQLite cache advanced only once the database write is confirmed, database-assigned ids only) but stay independent from it : a bid's price and bidder mutate over time, which Auction's model does not support. - Economy is escrow-based : the bidder is debited the moment a raise is accepted, before the bid row itself is updated, and refunded automatically (including offline, through the existing pending-currency queue) as soon as someone outbids them. BidSchedule pays the seller only after the item has been confirmed delivered to the winner (or parked in the expired items if they are offline), so a delivery failure and its automatic retry can never pay the seller twice. - New "bid" section in config.yml : its own duration/check period, its own minimum raise (floored above zero), its own per-rank cap, and a toggle to decide whether the classic min/max price bounds apply to a bid's start price (off by default). - AbstractGuiConfig/AbstractGui gained a bidGui block type so any menu (including the classic auction house, which now has a shortcut to it) can open the bid house ; ClaimManager gained a bid-only per-player claim so starting a sale and starting a bid never block each other. - New MessageKeys/events (BidAddEvent, BidPlaceEvent, BidWonEvent, BidCancelEvent) and permissions (fauction.bid, fauction.mod.bid.cancel, fauction.admin.purge.bid), translated in all four language files. - Moderator cancellation of a bid now requires shift-click and returns the item to the seller through the expired items, exactly like the classic auction's moderator cancel, instead of confiscating it into the moderator's own inventory. - Added unit tests for BidCommandManager (concurrent finalizers, stale-bid rejection, restore/refinalize, the SQLite-shutdown save re-applying the current bidder instead of erasing it), BidSchedule's expiry check, the new config section, and the bid-specific command validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.