Skip to content

[Feat] SimpleClaims data import #47

@derrickmehaffy

Description

@derrickmehaffy

Scope

  1. Import SimpleClaims parties as HyperFactions factions (owner → leader, members, name, description, color)
  2. Import chunk claims with dimension/coordinate mapping
  3. Import party allies as faction ally relations
  4. Map SimpleClaims protection flags to HyperFactions territory permissions (break, place, interact, PvP, friendly fire, door, container, bench, seat)
  5. Support dry-run mode and pre-import validation (consistent with existing importers)
  6. Should NOT import: reserved chunks (perimeter system has no HF equivalent), admin overrides, playtime-based claim scaling

Implementation Details

  • New class SimpleClaimsImporter following existing ElbaphFactionsImporter/HyFactionsImporter pattern
  • Read from SimpleClaims SQLite database (SimpleClaims/claims.db in Universe folder)
  • Command: /f admin import simpleclaims [path] (same pattern as existing importers)
  • Thread safety: share existing ReentrantLock/AtomicBoolean with other importers
  • Data mapping:
    • PartyInfoFaction (owner→leader, memberSet→members with MEMBER role, name, description, color as RGB int → nearest color code)
    • ChunkInfo (dimension + chunkX/chunkZ) → FactionClaim (world + chunkX/chunkZ)
    • partyAlliesRelationType.ALLY (bidirectional if both parties exist)
    • playerAllies → no direct equivalent (log as warning)
    • Protection flags → territory permission mapping
  • Permission: hyperfactions.admin.import (existing)

Risks and Alternatives

  1. Not a faction mod — SimpleClaims parties lack power mechanics, diplomacy (enemy/neutral), homes, economy, and other faction features. Imported factions will need manual configuration for these.
  2. SQLite dependency — SimpleClaims uses SQLite while HyperFactions importers currently parse JSON files. Need to add SQLite reading capability (can use JDBC directly since it's reading an external file, not managing our own DB).
  3. Player allies — SimpleClaims has individual player allies (no HF equivalent) and party allies (maps to faction allies). Player allies will be logged as warnings.
  4. Alternative — Instead of direct SQLite reading, could export SimpleClaims data to JSON first, but this adds friction for server owners.

References and Media

  • SimpleClaims source: https://github.com/Buuz135/SimpleClaims
  • Existing importers: com.hyperfactions.importer.ElbaphFactionsImporter, HyFactionsImporter
  • SimpleClaims data model: ClaimManager, PartyInfo, ChunkInfo classes
  • SimpleClaims DB location: <universe>/SimpleClaims/claims.db

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions