plugins/DuneGroups/README.md
unimatrixgit c37b65af52
Some checks failed
DuneGroups Replacement Build / dunegroups (push) Failing after 1m10s
DuneRealms Plugin CI / plugins (push) Has been cancelled
Integrate DuneGroups with explicit backend activation
2026-12-02 13:18:35 +01:00

5 KiB

DuneGroups: replaces Towny and Medieval Factions

Built from canonical plugins main 5d727d7f59e6af26fba07a3878fd79035a5923ce. Web main 8c25f491... was not touched or needed. Nothing is pushed to DuneGit. /plot and wilderness drafts are not included.

Switch

JarvisConnector config.yml: native.backend: legacy | dunegroups (default legacy).

  • legacy: unchanged behaviour. If DuneGroups is installed it is told to deactivate, so the jar alone changes nothing.
  • dunegroups: JARVIS activates DuneGroups. If DuneGroups or WorldGuard is missing, JARVIS logs SEVERE and disables itself instead of running without Home Block and WorldGuard projection. Rollback: set legacy, restart. DuneGroups drops every rule and its in-memory projection. Its homes.yml is kept for the next activation.

What replaced what

Before Now
Towny town home block / Factions home claim DuneGroups home chunk registry (clans, companies, protected offices, expanded estate chunks, claim revisions)
Towny setPVP(false) DuneGroups: nobody can hurt anybody on a company or protected-office home chunk (melee, projectiles, TNT, tamed pets, fire, splash, lingering clouds). Clans stay PvP. Only ever cancels; never clears another plugin's cancellation
NativeWorldGuard estate regions Unchanged class, now also run by the new worker for clans, companies and offices, with wars
Home NPCs, Kaitain Emperor NPC Same code, driven by the new worker
Faction roster/roles/neutrality/parents/wars OrganisationDirectory: central projection persisted in organisation-directory.json
ImperialRaid asking MedievalFactions ClanDirectory (central projection). Paid receipt validation, spawn checks, journal recovery and refunds are unchanged. New: the target claim revision must match the permit
Faction AT_WAR/LIEGE edges, Towny nations, mayor/caretaker, power Retired. No consumer outside the old worker was found. WarCampaignWorker is untouched

Relocation cleanup

Acknowledged only after verified absence of: DuneGroups claims, WorldGuard regions, the Home NPC, and any legacy Towny/Factions projection (if those plugins are still installed). The cleanup is written to dunegroups-worker.yml before the original requestId/keyId is acknowledged, and an unacknowledged one is re-sent first after a restart. No block is ever removed.

Bank

No bank, balance or Vault code was added or touched. Native roles grant nothing. The shared-inventory SQL (ExchangeInventory) is untouched.

Verified (CI, unimatrixgit/mcdune-backup branch claude/menus-ci)

  • DuneGroups builds; 12 unit tests: chunk maths, conflicts, malformed UUID/world/coordinates/revision, stale revision, unresolved vs archived, storage round trip, PvP policy.
  • JarvisConnector compiles with all changes; OrganisationDirectoryTest (rosters, roles, neutrality, parents, wars, review retention, duplicate war key, storage); existing TerrainAuthority/NativeCommandPolicy tests pass.

NOT verified (needs a server)

Reflection into Paper and WorldGuard, the PvP listener on real events, WorldGuard region writes, Home NPC placement, relocation and restart recovery end to end, paid travel, a real raid, and running with both vendor jars absent. Run the canary below before removing either plugin.

Canary checklist (one planet, vendor jars removed, vendor data kept)

  1. Start with legacy, confirm normal. Switch to dunegroups, restart: expect DuneGroups active, no SEVERE.
  2. /jarvis status: clans/companies/offices/wars/home chunks counts match the website.
  3. /dunegroups here on a clan, company and office home chunk; hit a player from outside and inside a company chunk; throw a harmful splash and lingering potion.
  4. WorldGuard: outsider cannot build in an estate; member can.
  5. Home NPC present for a clan and a company. Kaitain: Emperor NPC.
  6. Relocate a clan home: old chunk, region and NPC gone, then acknowledged once. Kill the server between persist and ack: after restart it acknowledges once.
  7. Break homes.yml write permission: sync must fail loudly and keep the old projection.
  8. Raid: paid order accepted, spawn checks pass, refund path on a stale revision.
  9. Switch back to legacy: DuneGroups rules stop immediately.

Open items found by the audit (not changed)

  • tools/install-plugin-fleet.py:277 still requires a reviewed MedievalFactions runtime. Fleet install fails without it.
  • tools/allow-giedi-nether-pearl.py and tools/disable-unused-vendor-settings.* configure Towny; Giedi Prime's Ender Pearl rule lives in Towny's unclaimed-zone settings and disappears with Towny.
  • DuneTerrain/trails/*-config.yml carry Towny path settings; harmless without Towny.
  • NativeCommandPolicy still intercepts /town, /f, /mf etc.; harmless but now redundant.
  • Company PvP has no exemption for active war campaigns. If wars on company land must allow PvP, say so.
  • Claim revision is read from homeBlock.claimRevision (fallback claimRevision); confirm the website uses that field.
  • The Towny nation/office tree is not reproduced anywhere; only protected neutrality and parents are kept as data.