File Details
oneriaserverutilities-3.0.1.jar
- R
- Mar 3, 2026
- 158.34 KB
- 5
- 1.21.1
- NeoForge
File Name
oneriaserverutilities-3.0.1.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
[3.0.1] - 2026-03-03
Fixed
License Revocation — No Longer Removes Item From Inventory:
/license revokenow only removes the profession fromlicenses.jsonand invalidates permissions.- The physical license item is kept in the player's inventory as a decorative object.
- Profession restrictions are lifted immediately via
ProfessionSyncHelper.syncToPlayer(). - Player is notified that their license has been revoked.
RevokedLicenseManager— Removed:- The class has been entirely removed as it no longer serves a purpose.
- All references in
OneriaEventHandlerandOneriaCommandshave been cleaned up.
OneriaEventHandler— Raw Thread Replaced:- The
new Thread(() -> { Thread.sleep(2000); ... }).start()pattern on player login has been replaced withCompletableFuture.runAsync(). - Eliminates the creation of one OS thread per player connection under load.
server.execute()ensures the deferred logic still runs on the server thread.- Added imports
net.minecraft.server.MinecraftServerandnet.neoforged.neoforge.server.ServerLifecycleHooks.
- The
OneriaServerUtilities.onServerTick()—serverVariable Scope:var serverwas declared inside theif (tickCounter++ % 40 == 0)block, making it invisible to the rest of the method.- Now declared once at the top of the method and reused by all blocks.
Added
TempLicenseExpirationManager— Automatic RP License Expiration:- New class handling automatic expiration of RP licenses issued via
/license giverp. - Two triggers:
checkOnLogin(player, server)on player connection, andtickMidnightSweep(server, hour, minute)called fromonServerTick()every 60 seconds (effective once per day at midnight). - On expiration: removes from
licenses-temp.json, removes fromlicenses.jsonas a safety measure, invalidates cache, syncs client restrictions, and notifies the player if online. - Physical item is kept in inventory — player is informed it is no longer valid.
- All expirations logged to
license-audit.jsonwith actionEXPIRE_RP. - Takes
MinecraftServeras an explicit parameter — never usesplayer.getServer()which is@Nullable.
- New class handling automatic expiration of RP licenses issued via
LicenseManager— Two New Methods:removeTempLicense(TempLicenseEntry)— removes a specific entry fromlicenses-temp.json, matched bytargetUUID+profession+expiresAt.logActionSystem(action, targetName, targetUUID, profession, extra)— logs an audit entry without a human staff actor, used for system-triggered actions such asEXPIRE_RP.
Technical
Removed Classes:
RevokedLicenseManager— fully deleted, no replacement needed.
New Classes:
TempLicenseExpirationManager— automatic expiration logic for RP licenses.
Modified Classes:
OneriaEventHandler— removedRevokedLicenseManagercalls, replaced raw thread, addedTempLicenseExpirationManager.checkOnLogin().OneriaServerUtilities— fixedserverscope inonServerTick(), addedtickMidnightSweepcall every 1200 ticks.OneriaCommands—revokeLicense()no longer callsRevokedLicenseManager, now callsProfessionSyncHelper.syncToPlayer()immediately after revocation.giveLicense()also callssyncToPlayer().LicenseManager— addedremoveTempLicense()andlogActionSystem().
Migration Notes
- No configuration changes required.
RevokedLicenseManageris gone — if you have any custom patches referencing it, remove them.- Players who had licenses revoked in 3.0.0 and still have the physical item in their inventory will keep it. Their permissions are already removed in
licenses.json— no action needed.

