cwhitelist-3.1-1.21.1-1.21.10-NeoForge.jar
Curse Maven Snippet
What's new
Changelog
2026-07-23
Added
- Heartbeat system: Automatically starts when the API is enabled, calling
/healthevery 30s to check connectivity; switches to 5s fast retry on failure, and reverts to 30s once restored. The heartbeat is bound to the API toggle – disabling the API stops it. - Player logout reporting: When a player leaves the game, a
POST /login/logoutrequest is sent, reportingplayer_name,player_uuid,player_ip, andserver_id. This shares thelogLoginEventstoggle with login events. - Global
server_idpropagation: All API requests (/health,/whitelist/sync,/whitelist/entries,/login/log,/login/logout) now forcibly carryserver_id. If not configured,"undefined"is used as fallback. - Warning for missing
server_id: When API mode is enabled butserverIdis empty, a prominent warning is printed to the console, prompting the server owner to configure it. - Singleplayer host player detection: Added
isHostPlayer()method; the owner of a singleplayer world is automatically allowed and detected via theisSingleplayerOwnerAPI, with log entries marked as[Host Login]. - Server-side translation preloading: Translation files for
en_usandzh_cnare preloaded at startup. Kick messages are translated server‑side based on the client’s language, so clients do not need the mod installed to see correct messages.
Changed
- Removed
sendServerIdconfig option:server_idis now always sent with every request; thesendServerIdsetting in the config file is deprecated. - Removed
API_SEND_SERVER_IDconfig option: The relevant field and build code have been deleted fromConfig.java.
Fixed
- Inverted
isValidForWritingsemantics: Previously returned!isActive || !canWrite || isExpired(); corrected toisActive && canWrite && !isExpired(). - Inverted
hasValidTokensemantics: Previously returned!isTokenVerified.get() || tokenInfo == null; corrected toisTokenVerified.get() && tokenInfo != null. - Inverted permission checks in sync operations: Token permission checks in
syncWhitelist,addEntry,removeEntry, andlogLoginEventwere corrected fromhasValidToken() || tokenInfo.isValidForXxx()to!hasValidToken() || !tokenInfo.isValidForXxx(). - Inverted
getTokenStatuslogic: ThehasValidToken()condition was corrected fromtrueto!false. - Local singleplayer players being incorrectly blocked: In
isAllowed(), the initialallowedvalue was changed fromfalsetoisHost, so the singleplayer owner is no longer intercepted by the whitelist. getPlayerIPsecurity enhancement: No longer directly casts toInetSocketAddress; usesinstanceofpattern matching, with fallback forLocalAddress(returns<host>for singleplayer/LAN), and returns"unknown"on exception.- Blank logs during initialization: Log writing and API login events now include an
isLoadedguard, executing only after the whitelist has been fully loaded, preventing empty entries from being generated during mod initialization.
Important
- If you need to use the API functionality, please make sure to use backend version 2.1.0 or higher.
This mod has no additional files

