-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Scope
- Prevent HyperFactions from claiming chunks already claimed in SimpleClaims
- Prevent SimpleClaims from claiming chunks already claimed in HyperFactions (requires SimpleClaims-side integration)
- Integration should be a soft dependency (reflection-based, works with or without SimpleClaims installed)
- Should respect SimpleClaims reserved chunks (perimeter buffer) in addition to direct claims
- Should provide clear feedback to players when a claim is blocked due to the other mod
- Optionally configurable (enable/disable in config)
Implementation Details
HyperFactions side (we implement)
- New
SimpleClaimsIntegrationclass incom.hyperfactions.integration.protection(same pattern asOrbisGuardIntegration) - Reflection-based access to
ClaimManager.getInstance()singleton - Check methods:
getChunk(dimension, chunkX, chunkZ)andgetReservedChunk(dimension, chunkX, chunkZ) - Hook into
ClaimManager.claimChunk()to check SimpleClaims before allowing HF claims - Config:
"simpleclaims": { "enabled": true, "respectReservedChunks": true }in config.json - Permission: none needed (server-level config toggle)
SimpleClaims side (PR or suggestion to Buuz135)
- SimpleClaims should check
HyperFactionsAPI.isClaimed(world, chunkX, chunkZ)before allowing claims - Our API is now on JitPack:
compileOnly 'com.github.HyperSystemsDev:HyperFactions:v0.8.1' - SimpleClaims already uses reflection for other integrations (LuckPerms, PartyPro) — same pattern applies
- Alternative: SimpleClaims could add a generic
ClaimCheckerinterface that external mods register — more extensible
Risks and Alternatives
- No stable API — SimpleClaims has no dedicated API package — all classes are internal and mutable. API surface could change between versions without notice.
- Reverse integration — The SimpleClaims → HyperFactions direction requires SimpleClaims to adopt our API or accept a PR. Buuz135 may prefer a different integration approach.
- Performance — Chunk claim checks happen frequently. Reflection overhead should be minimal since we cache method handles, but worth benchmarking.
- Alternative — Instead of direct mod-to-mod integration, both mods could integrate through OrbisGuard as a shared protection layer. However, this adds a mandatory third dependency.
References and Media
- SimpleClaims source: https://github.com/Buuz135/SimpleClaims
- HyperFactions API (JitPack):
com.github.HyperSystemsDev:HyperFactions:v0.8.1 - API docs: https://github.com/HyperSystemsDev/HyperFactions/blob/main/docs/api.md
- Existing integration pattern:
OrbisGuardIntegrationincom.hyperfactions.integration.protection - SimpleClaims
ClaimManagerAPI:getChunk(),getReservedChunk(),getInstance()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
To triage