Paradaux
PAR-166
0

[Epic] Spin out shop-search ("/find") into its own plugin; data layer stays in Treasury/Business

PlannedHighUnassignedChestShopFeature

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) via MarketApi/MarketListener — the same four ChestShop events the legacy ChestShopListener hooks (create / destroy / transaction / inventory-close).
  • Presentation → a new spun-out plugin (the /find chest 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/find search 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 resync admin command (chunk scan → MarketApi.upsertShop)

Cutover order (suggested)

  1. Data gaps PAR-167 / PAR-17 / PAR-171 (so /find has everything it needs to render + filter).
  2. PAR-169 backfill (so the registry is complete) → then build PAR-5 GUI.
  3. PAR-170 + PAR-172 holograms; PAR-173 adapters; PAR-174 resync.
  4. Decommission chestshop-database once /find reads Treasury and the registry is backfilled.

Comments

No comments yet.

Activity

  • tesks changed status to Status → PlannedJun 15, 2026, 12:33 AM
  • tesks description: Description updatedJun 14, 2026, 11:08 PM
  • tesks created the issueJun 14, 2026, 11:06 PM