v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); (function(){ try { var __m = "github.com"; var __re = new RegExp('^' + "github\\.com" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length \u003e 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes - #73

Closed
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1
Closed

v0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixes#73
derrickmehaffy wants to merge 37 commits into
mainfrom
dev/v0.9.1

Conversation

@derrickmehaffy

@derrickmehaffyderrickmehaffy commented Feb 24, 2026

Copy link
Copy Markdown
Member

Closed in favor of #74

Clean up orphaned temp/backup files before creating backup ZIP.
Skip .tmp and .bak files in addDirectoryToZip visitor.
Delete incomplete ZIP on backup failure.
Zone lookup exception in catch block now returns early (fail-safe)
instead of falling through to apply power loss. Log at WARN level.
Add adminBypassEnabled field to PlayerData with JSON serialization.
toggleAdminBypass now saves to player data file.
On connect, restore bypass if saved and player still has admin perm.
Clear stale bypass flag if player lost admin permission.
Add allowExplosionsInClaims config option (default false). When enabled,
explosions are permitted in faction-claimed chunks (not zones). Full
per-relation support deferred to HyperProtect-Mixin update.
Add color_legacy, name_colored, tag_colored, name_colored_legacy, and
tag_colored_legacy placeholders to both expansions. Implement PAPI
Relational interface for rel_factions_relation and rel_factions_relation_color.
Add hexToNearestLegacyCode utility with exact match and Euclidean RGB
distance fallback.
Add hardcoreMode config option. When enabled, faction power uses a
shared pool instead of individual player power. Death subtracts from
the faction pool (no floor), kills add to it, and regen applies to
the pool directly. Persisted in data/hardcore_power.json.
Add /f leaderboard (alias /f top) command and GUI page with ranked
faction listing. Sort modes: Power, Territory, Balance, Members.
Includes nav bar integration for both faction and new player views.
Replace all double-precision floating point with BigDecimal across 23
economy files for currency precision. Uses string constructor, scale 2,
HALF_UP rounding. Backward-compatible JSON deserialization handles both
old double and new string formats.
Add treasury_balance, treasury_balance_raw, treasury_autopay, and
treasury_limit placeholders to both HyperFactionsExpansion (PAPI)
and WiFlowExpansion. Uses BigDecimal formatting from EconomyManager.
Wire LogsViewerPage into faction nav bar with /f logs command.
Add AdminActivityLogPage for server-wide log aggregation with
type, time, and player filters.
Add WorldsConfig module (config/worlds.json) for configuring per-world
behavior: claiming, power loss, faction/ally friendly fire. Supports
wildcard patterns (% matches any sequence) with priority resolution.
Integrates with ClaimManager (claiming), PlayerDeathSystem (power loss),
and ProtectionChecker (friendly fire). Admin commands: /f admin world
list|info|set|reset. Legacy whitelist/blacklist in CoreConfig still
works as fallback when worlds module is disabled.
Add comprehensive changelog entry covering all 10 issues, BigDecimal
refactor, and per-world settings. Update README feature tables with new
capabilities: per-world settings, hardcore mode, leaderboard, expanded
placeholders.
Fix #Title.Text selector crash on logs page — #Title is a $C.@container
slot (Group), not a Label. Added #LogsTitle ID to the $C.@title template
and target that instead. Enable the View All button in the dashboard
activity feed to navigate to the logs viewer page.
…cersCanEdit accessors
Remove 12 unused accessor methods (memberBreak, memberPlace, memberInteract,
officerBreak, officerPlace, officerInteract, allyBreak, allyPlace, allyInteract,
outsiderBreak, outsiderPlace, outsiderInteract) and 10 unused builder methods
(withOutsiderBreak/Place/Interact, withAllyBreak/Place/Interact,
withMemberBreak/Place/Interact, withPvpEnabled, withOfficersCanEdit) from
FactionPermissions — all verified zero callers.
Fix pvpEnabled() and officersCanEdit() to use get() instead of getRaw() for
consistent fail-closed parent-child flag resolution behavior.
Add treasuryDeposit, treasuryWithdraw, and treasuryTransfer flags to the
defaults and locks sections, nested under a "treasury" key. Enables server
admins to set default treasury permissions and lock them for all factions.
Existing getEffectiveFactionPermissions() already iterates all locks, so
treasury flags are automatically enforced without additional wiring.
Create FactionsConfig (faction gameplay: faction, power, claims, combat,
spawn protection, relations, invites, stuck) and ServerConfig (server
behavior: teleport, auto-save, messages, GUI, permissions, updates).
Add 9 new claim protection overrides to FactionsConfig: outsiderPickup,
outsiderDrop, 3-way explosions (factionless/enemy/neutral), fireSpread,
3-way outsider entity damage (factionless/enemy/neutral).
Move territoryNotificationsEnabled from CoreConfig to AnnouncementConfig.
Mark CoreConfig as @deprecated legacy fallback reader.
Re-route all ConfigManager convenience methods to new backing configs.
Legacy config.json is still loaded as fallback if present.
Extract faction/server settings from monolithic config.json into
config/factions.json + config/server.json. Transform allowExplosionsInClaims
into 3 granular flags (factionless/enemy/neutral). Add 6 new claim
protection settings with behavior-preserving defaults. Move
territoryNotifications into config/announcements.json.
Delete config.json after extraction — configVersion now lives in
config/server.json. All data extracted before deletion, auto-backup
created by MigrationRunner.
shouldBlockExplosion: replace single allowExplosionsInClaims with 3-way
check (factionless/enemy/neutral). Explosion hooks lack player UUID, so
all 3 must be true to allow — documented limitation.
shouldBlockFireSpread: replace hardcoded block with configurable
fireSpreadAllowed check.
canPickupItem: replace hardcoded outsider deny with outsiderPickupAllowed
config check.
canDamagePlayerChunk: add outsider entity damage 3-way check by
relationship (factionless/enemy/neutral) to claim owner.
ItemDropProtectionSystem: add claim-based outsider drop check using
outsiderDropAllowed config (allies exempt).
…ction settings
Rewrite protection docs as 4 focused documents (claims, zones, global, systems)
with protection.md as navigation hub. Update all config references from
CoreConfig/config.json to FactionsConfig/ServerConfig. Document 9 new claim
protection settings, 3-way explosion/damage configs, V5→V6 migration, and
explosion source attribution limitation. Fix treasury GUI note, update storage
file structure, update README quick-start.
…yperProtect lifecycle
CoreConfig is null after V5→V6 migration deletes config.json, causing NPE
in initHyperProtectMixinLifecycle() and AdminUpdateHandler. All HyperProtect
config methods already exist on ServerConfig.
@derrickmehaffyderrickmehaffy changed the title v0.9.1: Per-world settings, leaderboard, activity log, hardcore mode, placeholders, bug fixesv0.9.1: Per-world settings, config restructure, data migration, leaderboard, activity log, placeholders, bug fixesFeb 26, 2026
Add per-UUID locking to JsonPlayerStorage to serialize concurrent writes
to the same player file. The previous async load-increment-save pattern
allowed two rapid kills to both read stale data, losing an increment.
savePlayerPower (called by regen timers) could also overwrite kill/death
data via its own unsynchronized load-modify-save cycle.
- Add updatePlayerData(UUID, Consumer) to PlayerStorage for atomic
read-modify-write with per-UUID ReentrantLock
- Extract savePlayerDataSync() to share between savePlayerData,
savePlayerPower, and updatePlayerData
- Lock savePlayerData and savePlayerPower to prevent cross-method races
- Extract trackKillDeath() helper in PlayerDeathSystem, replacing 5
identical copy-pasted load-increment-save blocks
Add roles section to config/factions.json allowing server owners to
customize role names (e.g. Boss/Underboss/Soldier) and short forms
(e.g. BO/UB/SO). All GUIs, commands, and log messages now use
configured display names instead of hardcoded role names.
- Add getRoleDisplayName/getRoleShortName to ConfigManager
- New placeholders: factions_role_display, factions_role_short
- Validate display names non-empty, short names ≤4 chars
- Update /who, /members, /promote, /demote, all GUI pages
- Update PAPI and WiFlow placeholder expansions
Move all data files into data/ subdirectory for cleaner organization.
DataV0ToV1Migration automatically moves factions/, players/, chat/,
economy/, zones.json, invites.json, and join_requests.json on first
startup. Creates ZIP backup before migrating for safe rollback.
- data/.version marker tracks data layout version (1)
- Fresh installs create data/ directly, no migration needed
- If crash before marker write, migration re-runs on next startup
- Register migration in MigrationRegistry
- Update HyperFactions startup to resolve data dir from marker
Upgrade economy, invites, and join request storage to use
StorageUtils.writeAtomic() for crash-safe writes with SHA-256
verification. Expand backup archives to include chat history,
economy, invites, and join requests alongside existing data.
- JsonEconomyStorage, InviteManager, JoinRequestManager now atomic
- .bak files cleaned up after successful writes
- Orphaned .tmp/.bak cleaned on startup
- BackupManager and MigrationRunner include all data/ contents
…placeholders
- config.md: add roles section with mafia theme example
- storage.md: expand safe-save mechanism, data directory migration
- placeholders.md: update tables (35→37), add role_display/role_short
- data-import.md: document DataV0ToV1Migration detection logic
- readme.md: update doc index links
- README.md: mention customizable role display names
Add 2 new per-role faction permission flags (CrateUse, NpcTame) across
all 4 relationship levels (8 flags total, 45→53). Add 3 new zone flags
(crate_pickup, crate_place, npc_tame) in Entity Interaction category
(34→37 flags). UseHook routes interaction class names to specific
InteractionType for independent protection checks. NPC handler uses
NPC_TAME type instead of generic INTERACT.
All 7 ECS protection systems now cancel events when the world name
cannot be determined or an exception occurs (previously allowed the
action silently). Denied block placements now teleport the player to
reset client-predicted ghost blocks that enabled pillar climbing.
BlockBreak/BlockPlace evaluate canInteract() once instead of twice.
Debug logging standardized with [ECS:*] and [OG:*] prefixes.
NpcInteractionProtectionHandler registered in EventRegistration.
Instance World Protection:
- Default instance-% wildcard rule blocks claiming in temp instance worlds
- /f sethome blocked in worlds where claiming is disallowed
- Automatic cleanup of stale claims/homes on startup and config reload
Zone Notification Settings:
- Per-zone notification toggle (notify on entry true/false)
- Customizable upper/lower title text overrides
- Admin commands: /f admin zone notify, /f admin zone title
- Zone info displays notification settings
- TerritoryNotifier uses Zone-aware factories for notification data
Rebalances the 36-flag zone settings page from a lopsided 2-column
layout (16 left / 20 right) to 3 balanced columns grouped thematically:
Left (Combat, Damage, Death), Middle (Building, Interaction, Entity
Interaction), Right (Transport, Items, Spawning). Container widened
from 720 to 880px and shortened from 840 to 680px.
Consolidate zone name editing, type changing, and notification settings
into a single properties page. Zone list replaces separate Rename/Type
buttons with a unified Settings button. Type change modal and flags
page now navigate back to properties when opened from that context.
ATOMIC_MOVE fails on Windows when antivirus or file indexer holds a
brief handle on the target file. StorageUtils.writeAtomic() now retries
3 times with increasing delays (50/100/150ms) before falling back to a
non-atomic move, which is still safe since the .bak backup already
exists at that point. All 8 storage callers benefit automatically.
…ard, admin info redesign
Add per-player and global K/D reset, new "Actions" admin page with two-step
confirmation, faction K/D as default leaderboard sort (cached refresh), and
admin commands `/f admin info` and `/f admin who`.
Redesign admin player info as two-column layout mirroring /f who data: first
joined, last online, faction card with View Faction button, compact membership
history, power/combat controls on right. Redesign admin faction info with
two-column layout and disband button.
Add Admin Version page to admin nav bar showing mod versions and
integration statuses (permissions, protection, placeholders, economy).
/f admin version works from both GUI (players) and console.
VaultEconomyProvider.getEconomyName() detects registered economy plugin
name via reflection (e.g. "Ecotale") for display in GUI and chat.
Fix HyperProtect version always showing "1.0.0" — HyperProtectIntegration
hardcoded the version when lazily creating the bridge. Now detects actual
version from JAR filename in earlyplugins/.
@derrickmehaffy
derrickmehaffy deleted the dev/v0.9.1 branch February 27, 2026 06:33
Sign up for freeto 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

@derrickmehaffy