PAR-166
[Epic] Spin out shop-search ("/find") into its own plugin; data layer stays in Treasury/Business
Goal
Retire the legacy standalone chestshop-database plugin (its own MariaDB + /find GUI + holograms) and re-home its functionality:
- Data layer → Treasury/Business (the economy DB we already own). ChestShop-3 already feeds
chestshop_shop+chestshop_sale(V6) viaMarketApi/MarketListener— the same four ChestShop events the legacyChestShopListenerhooks (create / destroy / transaction / inventory-close). - Presentation → a new spun-out plugin (the
/findchest GUI, holograms, sorting/filtering, WorldEdit/WorldGuard adapters) that reads Treasury's market data (DB direct or via the public/api/v1/chestshop/**endpoints, PAR-116) instead of keeping its own store.
Why this is mostly already done
Treasury's V6 chestshop_shop/chestshop_sale is a superset of the legacy Shop table on the owner/item/price/stock axes and adds per-trade history + ledger linkage the legacy plugin never had. The remaining work is a short list of data-model gaps + porting the plugin-side presentation features.
Comparison reference (legacy → Treasury)
Legacy Shop/Item/PreviewPreference (MariaDB, world UUID key, owner_name string, shared Item(item_bytes) table, estimated_capacity, visible, hologram, per-player preview pref) vs Treasury chestshop_shop/chestshop_sale (world name key, structured owner account/firm/admin, item_key/material/item_data-when-custom, current_stock, no capacity/visible/hologram).
Data-layer gaps (Treasury / Treasury API)
- PAR-17 — remaining capacity / free space on
chestshop_shop - PAR-167 — per-shop search visibility flag (owner can hide from
/find) - PAR-168 — hologram data layer (per-shop hologram flag + per-player preview preference)
- PAR-169 — backfill + resync support (registry is lazy; untouched shops absent) ⚠️ migration-blocking
- PAR-170 — spatial query support (location index + region/chunk/distance read API)
- PAR-171 — rendering-fidelity & world identity (vanilla item icon + world UUID vs name)
Plugin / presentation (new spun-out repo; filed under ChestShop as a holding pen)
- PAR-5 —
/findsearch GUI core (sort/filter/search, resolve owners → accounts) - PAR-172 — holograms (per-chunk previews, per-shop + per-player toggle)
- PAR-173 — external integrations (WorldEdit/FAWE cleanup + WorldGuard placeholder)
- PAR-174 —
/find resyncadmin command (chunk scan →MarketApi.upsertShop)
Cutover order (suggested)
- Data gaps PAR-167 / PAR-17 / PAR-171 (so
/findhas everything it needs to render + filter). - PAR-169 backfill (so the registry is complete) → then build PAR-5 GUI.
- PAR-170 + PAR-172 holograms; PAR-173 adapters; PAR-174 resync.
- Decommission
chestshop-databaseonce/findreads Treasury and the registry is backfilled.
Comments
No comments yet.
Activity
- tesks changed status to Status → Planned
- tesks description: Description updated
- tesks created the issue