Change listing expiration
Listing lifetime (listing-expiry-days) and cleanup timer every 30 minutes.
Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.
A listing has a listing date and expires after N days. Default 7.
Key
settings:
listing-expiry-days: 7ConfigManager.listingExpiryDays ← getInt("settings.listing-expiry-days", 7).
30-minute timer
On start the plugin immediately calls storageManager.removeExpiredListings() and processExpiryOutbox(), then repeats this every 30 minutes:
storageManager.removeExpiredListings();
storageManager.processExpiryOutbox();
Bukkit.getScheduler().runTaskTimer(this, () -> {
storageManager.removeExpiredListings();
storageManager.processExpiryOutbox();
}, 20L * 60 * 30, 20L * 60 * 30);20L * 60 * 30 ticks = 30 minutes. A listing may therefore hang up to ~30 minutes after exceeding listing-expiry-days before the timer collects it. Reload also calls removeExpiredListings().
What happens after expiry
Item returns to the seller (inventory or mailbox when mailbox.enabled). Message:
messages:
expiry:
returned: "Twoja wygasła oferta &e{item} &7została zwrócona do ekwipunku."Admin can force: /market admin forceexpire <id>.
How to change
listing-expiry-days: 3(shorter market) or14./market reload.- GUI lore shows
messages.gui.lore.expires({time}).
history.retention-days: 30 is transaction history retention, not listing lifetime. Do not confuse these keys.
What is missing
Real auctions with an “auction end”. Expiry removes a fixed-price listing from listings.yml.