Skip to content

feat: add FactionsX data importer#75

Open
derrickmehaffy wants to merge 1 commit into
mainfrom
feat/factionsx-import
Open

feat: add FactionsX data importer#75
derrickmehaffy wants to merge 1 commit into
mainfrom
feat/factionsx-import

Conversation

@derrickmehaffy

Copy link
Copy Markdown
Member

Summary

  • Adds a complete data importer for migrating servers from FactionsX (by Humblegod666, v1.0.533) to HyperFactions
  • 8 Gson-mapped data model records matching FactionsX on-disk JSON format (config/factions/, config/players/, Claims.json, Zones.json)
  • Full FactionsXImporter with validate/importFrom following the same pattern as HyFactionsImporter and ElbaphFactionsImporter
  • Admin command: /f admin import factionsx [path] [flags] with --dry-run, --overwrite, --no-zones, --no-power
  • Cross-importer lock safety added across all three importers to prevent concurrent imports

Key implementation details

  • Per-player power from individual player files (not even-split like HyFactions)
  • Owner is NOT in the Members map — added as LEADER implicitly
  • RECRUIT role mapped to MEMBER with warning (no HyperFactions equivalent)
  • Per-role permissions (Build/Claim/Interact/Invite/Kick) mapped to territory flags
  • Zone chunks parsed from "chunkX:chunkZ" strings, clustered via BFS
  • ChunkY=Z naming quirk handled (same as HyFactions)
  • Data root confirmed as config/ via decompiled FileUtils.java

Test plan

  • Place sample FactionsX data in mods/FactionsX/config/
  • Run /f admin import factionsx --dry-run — validates without changes
  • Run /f admin import factionsx — imports successfully
  • Verify imported factions in /f list, claims on map, zones working
  • Test --overwrite flag with existing factions
  • Test cross-importer lock (start two imports simultaneously)

🤖 Generated with Claude Code

Add importer for migrating servers from FactionsX (by Humblegod666) to
HyperFactions. Follows the same pattern as existing HyFactions and
ElbaphFactions importers.

- 8 Gson-mapped data model records matching FactionsX JSON format
- Full importer with validate/importFrom, per-player power, permission
  mapping, zone chunk parsing ("x:z" strings), and ChunkY=Z quirk
- Admin command: /f admin import factionsx [path] [flags]
- Cross-importer lock safety across all three importers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant