Skip to main content

Shop Lifecycle

DistrictWarden watches whether each shop can trade, warns the owner when one sits idle, and gives staff a safe way to clear and later restore an abandoned shop. Nothing here is automatic beyond the warnings — every removal and restore is one explicit staff command.

Shop states​

Every tracked shop is in one of three states:

  • ACTIVE — the shop can trade right now.
  • EMPTY — it cannot. A selling shop with nothing left to sell, or a buying shop with no room or no funds.
  • FROZEN — trading has been turned off for that shop.

Warnings​

A daily scan checks each shop's stock. A shop that has been unable to trade for lifecycle.stale-shop-days days (default 30) earns its first warning. After that, DistrictWarden reminds the owner every lifecycle.warning-interval-days days (default 7) until the shop can trade again. Both values are set in config.yml.

A warning is a notice only — to the server log, to the owner in game when online, and, if enabled, to Discord and MineMail. A warning never removes a shop. Review it with the owner before taking any further action.

The inspection patrol​

During the scan, a single temporary vanilla Warden mob emerges from the ground at each loaded shop in turn, looks the shop over, then digs back down — a visible sign that the district is being inspected. Its AI is disabled; it is silent, invulnerable, non-collidable, cannot pick up items, and is not saved to disk. It cannot attack, touch stock, or interact with players, and it is removed after each visit. Shops in unloaded chunks are skipped for the patrol — the monitoring scan still covers them.

You can preview this on demand without waiting for a scan: /dw test warden spawns the inspection warden where you stand, and /dw test simulate plays it together with a sample empty-shop warning. See Commands.

Archiving and removing a shop​

If staff decide a shop should be removed, find its id and archive it:

/dw shops <property>
/dw archive-shop <shop-id> <reason>

/dw archive-shop:

  1. Records an archive snapshot of the shop's settings;
  2. Removes that QuickShop through its provider;
  3. Clears DistrictWarden's tracking row for the shop;
  4. Writes an audit entry with the staff actor and the reason.

If provider removal fails, the temporary archive is discarded and the shop stays — the action is all-or-nothing.

What an archive saves

An archive stores the shop's configuration: owner, type (buy/sell), item, price, stack size, the unlimited flag, and location. It does not copy the chest's contents or any stockpile of traded items. Check and empty the container before you remove or move a shop.

Restoring a shop​

List archives to find the id, then restore:

/dw archives
/dw restore-shop <archive-id>

By default the shop is recreated at its original chest location. Pass world x y z to place it on a different chest:

/dw restore-shop <archive-id> world 100 64 -200

QuickShop-Hikari imposes its own conditions on restore:

  • the original owner must be online;
  • the target block must be a valid chest;
  • there must be an empty sign position directly above the chest.

A restored archive can be used once — after a successful restore it is spent.

What DistrictWarden will not do​

  • It never removes a QuickShop-Hikari shop on its own. Warnings and scans only observe and notify.
  • Startup and /dw reconcile never delete an in-game shop.
  • Releasing a whole property (resetting its blocks) is handled by the WorldEdit archive provider, which is not built yet.