File Details
oneriaserverutilities-3.0.0.jar
- R
- Mar 2, 2026
- 155.12 KB
- 6
- 1.21.1
- NeoForge
File Name
oneriaserverutilities-3.0.0.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
[3.0.0] - 2026-03-02
⚠ Breaking Change: Configuration entirely restructured into 5 separate files under config/oneria/.
Automatic migration is included — no manual action required on first launch.
Added
License Audit Log: Every license action permanently recorded in
world/data/oneriamod/license-audit.json:- Tracks
GIVE,REVOKE, andGIVE_RPactions. - Stores timestamp, staff name & UUID, target name & UUID, profession, and extra info.
- Persists across restarts — full history always available.
- Logged to server console simultaneously for real-time monitoring.
- Tracks
Temporary License Registry: RP licenses issued via
/license giverpnow tracked inworld/data/oneriamod/licenses-temp.json:- Stores issuance date, expiration date, duration in days, staff emitter, and recipient.
- Acts as a permanent administrative registry — no automatic expiration logic (date is printed on the physical item).
- Also logged to
license-audit.jsonwith the expiration date as extra info.
Config Split — 5 separate files: The monolithic
oneriaserverutilities-server.tomlhas been split into themed config files underconfig/oneria/:oneria-core.toml— Obfuscation, Permissions, WorldBorder & Zones.oneria-chat.toml— Chat formatting, timestamps, markdown, join/leave messages.oneria-schedule.toml— Schedule system, warnings, welcome message & sound.oneria-moderation.toml— Silent commands and teleportation platforms.oneria-professions.toml— Profession definitions and restrictions (moved fromconfig/root toconfig/oneria/).
ConfigMigrator — Automatic migration on first launch:
- Detects the legacy
oneriaserverutilities-server.tomlon startup. - Parses all values and redistributes them into the 5 new files, preserving every custom value.
- Handles renamed keys automatically (e.g.
serverClosedMessage→msgServerClosed,warningMessage→msgWarning). - Renames the legacy file to
.migrated.bak— your data is never deleted. - Skips migration entirely if new files already exist — safe to restart multiple times.
- Full migration report logged to server console.
- Detects the legacy
OneriaPatternUtils: New shared wildcard pattern matching utility:
- Used by both
ClientProfessionRestrictionsandProfessionSyncHelper. - Eliminates duplicated matching logic across the codebase.
- Used by both
Improved
LicenseManager — Enriched API:
- New inner classes:
AuditEntryandTempLicenseEntry. - New methods:
logAction(),addTempLicense(),getAuditLog(),getAllTempLicenses(). - All three files share the same async save pattern via
CompletableFuture. reload()now resets and reloads all three files simultaneously.
- New inner classes:
Thread Safety — ConcurrentHashMap across all managers:
OneriaPermissions,LicenseManager,ProfessionRestrictionManager,NicknameManager, andProfessionRestrictionEventHandlermigrated toConcurrentHashMap.- Eliminates race conditions under high player count or concurrent server-side events.
Regex cache in ProfessionRestrictionManager:
- Wildcard patterns (e.g.
minecraft:*_sword) are now compiled once viacomputeIfAbsent()and cached in aConcurrentHashMap. - Avoids repeated
Pattern.compile()calls on every craft, break, use, and equip check.
- Wildcard patterns (e.g.
Async I/O in NicknameManager:
- File reads and writes now run via
CompletableFutureto avoid blocking the server thread.
- File reads and writes now run via
Tick-based filtering in CraftingAndArmorRestrictionEventHandler:
- Equipment checks no longer run on every tick.
- Reduces CPU overhead on servers with many simultaneous online players.
OneriaCommands — modifyList() factorization:
- The 9 handlers for whitelist/blacklist/alwaysvisible (add/remove/list × 3 lists) are now delegated to a single
modifyList()method. - Eliminates ~60 lines of duplicated logic.
- Original formatting style preserved (1522 lines vs 1606 — reduction from factorization only, no logic removed).
- The 9 handlers for whitelist/blacklist/alwaysvisible (add/remove/list × 3 lists) are now delegated to a single
OneriaCommands — giveLicense(), revokeLicense(), giveRPLicense():
- Now call
LicenseManager.logAction()on every action. giveRPLicense()additionally callsLicenseManager.addTempLicense()to register the temp entry.- Staff player resolved from
CommandSourceStack— supports both player and console execution.
- Now call
Fixed
- UUID Bug in ProfessionRestrictionManager:
isExemptFromProfessionRestrictions()was comparing by player name instead of UUID.- Player name changes no longer silently break profession exemptions.
Technical
New Classes:
ConfigMigrator— One-shot migration utility, runs beforeregisterConfig()on startup.OneriaPatternUtils— Shared wildcard pattern matching, used byClientProfessionRestrictionsandProfessionSyncHelper.ChatConfig— Config class for chat system and join/leave messages (oneria-chat.toml).ScheduleConfig— Config class for schedule, messages, and welcome system (oneria-schedule.toml).ModerationConfig— Config class for silent commands and platforms (oneria-moderation.toml).
Enhanced Classes:
LicenseManager— Three-file I/O,AuditEntry/TempLicenseEntryinner classes, full audit & temp license API.OneriaCommands—giveLicense(),revokeLicense(),giveRPLicense()wired to audit log and temp registry.modifyList()factorization.OneriaConfig— Now only contains Obfuscation, Permissions, and WorldBorder/Zones. Chat, Schedule, Moderation extracted to dedicated classes.OneriaServerUtilities— Registers 5 configs with explicitoneria/paths, callsConfigMigrator.migrateIfNeeded()before registration.ProfessionRestrictionManager— ConcurrentHashMap, regex cache, UUID-based exemption check.NicknameManager— Async I/O via CompletableFuture.CraftingAndArmorRestrictionEventHandler— Tick-based equipment check filtering.ClientProfessionRestrictions/ProfessionSyncHelper— Deduplicated via OneriaPatternUtils.
Data Storage:
world/data/oneriamod/license-audit.json— Append-only audit log, JSON array ofAuditEntryobjects.world/data/oneriamod/licenses-temp.json— RP license registry, JSON array ofTempLicenseEntryobjects.
Migration Notes
- Fully automatic —
ConfigMigratorhandles everything on first launch. No manual action required. - Legacy
oneriaserverutilities-server.tomlis backed up asoneriaserverutilities-server.toml.migrated.bakin the sameconfig/folder. oneria-professions.tomlmoves fromconfig/root toconfig/oneria/— handled by the migrator.- If migration fails for any reason, the legacy file is left completely untouched and a detailed error is logged. Contact the dev team for manual migration assistance.
- All custom values (whitelist, platforms, schedules, messages, zones, etc.) are fully preserved through migration.

