History
Transaction history — always saved, /market history gated by history.enabled, retention only COMPLETED.
Based on GrzybcioRynek 1.0.3 and web 0.1.0 source.
Every transaction from buyItem (and rollback/refund) lands in market-data.yml → transactions. history.enabled does not disable saving.
Flag vs GUI
history:
enabled: true
retention-days: 30| Entry | Checks history.enabled? |
|---|---|
/market history / historia | Yes — when false, hardcoded: Historia transakcji jest wyłączona. |
Browse button slot 53 (BOOK) | No — always opens HistoryGUI |
market.history from plugin.yml is not checked in Java.
GUI
HistoryGUI — 54 slots.
| Slot | Role |
|---|---|
| 3 | Purchases tab (gui.history.tab-purchases) |
| 5 | Sales tab (gui.history.tab-sales) |
| 10–16, 19–25, 28–34 | Records |
| 45 | Back |
| 48 / 49 / 50 | Pagination |
Empty: gui.history.empty on 22.
Lore: price, seller/buyer, fee, age. When ratings.enabled and TX unrated — gui.history.lore.rate; click starts rating on chat.
Retention
ExtendedDataStore.pruneHistory() removes records that are both:
- older than
retention-days, - in state
COMPLETED.
ROLLED_BACK, FAILED and other states remain — needed for refunds and diagnostics.
Persistence
Always after purchase commit (addTransaction). Independent of history.enabled and stats.enabled.