Skip to content

Add a bidding system (/ah bid) alongside the classic fixed-price auction - #31

Open
Florianpal1 wants to merge 2 commits into
masterfrom
feature/bid
Open

Add a bidding system (/ah bid) alongside the classic fixed-price auction#31
Florianpal1 wants to merge 2 commits into
masterfrom
feature/bid

Conversation

@Florianpal1

Copy link
Copy Markdown
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant