feat: per-world max claims and World Settings API - #108
Merged
Conversation
Add maxClaims per-world setting to limit how many claims a faction can hold in a specific world. Null/0 = use global limit, >0 = hard cap. Enforced in both claim and overclaim flows. Add thread-safe World Settings API for external plugins to register, query, and remove per-world settings programmatically with upsert semantics and immediate persistence. - WorldSettings record: 5th param maxClaims (Integer, nullable) - WorldSettingsResolver: volatile + copy-on-write for thread safety - ConfigManager: registerWorldSettings/removeExternalWorldSettings - ClaimManager: WORLD_MAX_CLAIMS_REACHED + per-world check - HyperFactionsAPI: 4 new world settings methods - Admin commands: maxclaims support in set/info/list - Localized messages in all 10 locales (20 .lang files) - Documentation: config, api, commands, managers
Add integer stepper for maxClaims in the world override expanded settings panel. Supports increment/decrement buttons and direct numeric input. Value of 0 = use global limit (stored as null).
Fix {0} placeholder not being filled in world_max_claims messages across
all 5 call sites (claim command, overclaim command, dashboard, chunk map).
Add login warning for officers/leaders when their faction exceeds any
per-world claim limit — existing claims are preserved (soft cap) but
officers are notified to voluntarily unclaim excess territory.
- Make ClaimManager.countFactionClaimsInWorld() public
- Add ConfigManager.getWorldsConfig() getter
- Add world_overclaimed locale key (all 10 languages)
86 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add per-world max claims setting and a thread-safe World Settings API for external plugin integration.
Per-World Max Claims: New
maxClaimsfield inworlds.jsonlimits how many claims a single faction can hold in a specific world (e.g., 5 claims max in an "events" world).null/0= use global limit. Enforced in both/f claimand/f overclaim. Admin-manageable via/f admin world set <world> maxclaims <n>.World Settings API: 4 new
HyperFactionsAPImethods (registerWorldSettings,getWorldSettings,getConfiguredWorldSettings,removeWorldSettings) for external plugins (like HyperVerse) to programmatically inject per-world settings with upsert semantics, immediate persistence, and thread safety.Type of Change
Related Issues
N/A — planned feature for 0.12.0
Testing
Manual testing plan:
/f admin world set survival maxclaims 3/f admin world info survivalshows maxClaims=3claiming: falsefor a world → verify it still blocks entirelyHyperFactionsAPI.registerWorldSettings(...)HyperFactionsAPI.removeWorldSettings(...)removes and persists/f admin world listshows all settings including API-injected onesChecklist
Files changed (38):