Replace ChestShop's internal "Bukkit events as middleware" economy layer (the Currency*Event fan-out routed through TreasuryListener) with a direct EconomyService — ChestShop's single TreasuryApi boundary, the treasury-api-style internal API. Genuine cross-plugin event integration points (AccountQuery/AccountAccess) stay as events.
Staged, money-path-critical — each step ships independently and is smoke-tested:
Done — internal currency event bus fully removed. Steps 1–4 + final AccountCheck collapse, all on develop:
EconomyService is now ChestShop's single TreasuryApi boundary: format / deposit / withdraw / hasFunds / getBalance / canHold / hasAccount / settle. Seven internal events deleted (CurrencyTransfer/Add/Subtract/Check/Amount/Hold/Format + AccountCheck) plus EconomicEvent; deleted ServerAccountCorrector and TaxModule; TreasuryListener reduced to the genuine Business/Treasury integration (AccountQuery/AccountAccess/sign-migration). Trade settlement is now one direct buyer→seller transfer (atomic, no SYSTEM hop) — admin shops still use SYSTEM as money sink/source. AccountQuery/AccountAccess stay as events (real cross-plugin integration points).
Smoke test recommended across the money path (create/break shops, fees, refunds, buy/sell incl. can't-afford + partial fills, admin shops, business shops, tax) before release.
Steps 1–3 done + pushed to develop:
Net so far across steps 2+3: ~-1000 lines. Five internal currency events deleted.
Remaining — Step 4 (the core trade money path, highest risk): collapse CurrencyTransferEvent (TransactionService settle + tax) into EconomyService.settle(...), reproducing TreasuryListener.onCurrencyTransfer (2–3 TreasuryApi transfers + rollback + TaxApi rate tax) and the ServerAccountCorrector partner normalisation; collapse AccountCheckEvent. Then retire ServerAccountCorrector + the EconomyAdapter base + TaxModule, and the TreasuryListener resolution-helper duplication. Recommend a smoke test of steps 2–3 (creation fees, refunds, affordability, partial fills) before doing the settlement core.