NeuroLag
1.8.0A smart, resource-aware optimization plugin that dynamically adjusts Mob AI based on server TPS and RAM to ensure a lag-free SMP experience
1.8.0latestNeuroLag 1.8.0Jun 2, 2026 [1.8.0] — 2026-06-01 — Code Audit: Complete Bug-Fix & Refactor Release
Full-source audit pass following v1.7.1. Every bug identified during the review has been fixed in this release. Two partially-finished refactors from the 1.7.x cycle have been completed, and dead code has been removed.1.7.1NeuroLag 1.7.1May 20, 2026 [1.7.1] — 2026-05-18 — Bug Fix Release
This release corrects five bugs identified in a full source-code audit of 1.7.0. Three of them were silent correctness failures that made advertised features behave differently from their documented intent without producing any visible error.
#### Fixed —Critical Fixes
LagEngine— Safe Mode FOLLOW_RANGE silently overwritten every tick - Root cause: AfterSafeModeOptimizer.applySafeMode()setFOLLOW_RANGE = 4.0, the lambda inapplyAiBatched()fell through to an unconditionalattr.setBaseValue(attr.getDefaultValue() * multiplier)at the bottom of the loop. In CRITICAL statemultiplier = 1.0, so the attribute was reset to its default value on every single tick — completely negating the FOLLOW_RANGE reduction that Safe Mode is supposed to maintain. - Fix: Addedcontinueimmediately aftersafeModeOptimizer.applySafeMode(mob)to skip the unconditionalsetBaseValueline, matching the existing pattern used by the pathfinding-distance branch above it. - Impact: Safe Mode now actually reduces mob target-scanning range during CRITICAL state as documented. Servers usingsafe-mode: truewill see measurably lower entity processing cost during lag spikes. #### Fixed —SafeModeOptimizer—NullPointerExceptioncrash on certain entity types - Root cause:disableExpensiveAI()and the previousrestoreAI()calledmob.getAttribute(FOLLOW_RANGE).setBaseValue(...)without a null-check.getAttribute()returnsnullfor entity types that do not exposeFOLLOW_RANGE(e.g. Slime, Bat, some modded mobs), causing an unhandledNullPointerExceptionthat bubbled up through the scheduler and printed a stack trace every tick. - Fix: Extracted the result ofgetAttribute()into a local variable and guarded both call sites withif (attr != null). #### Fixed —SafeModeOptimizer—restoreAI()used a hardcoded FOLLOW_RANGE table - Root cause: The previous implementation maintained an internalswitchtable mappingEntityType → doublefor the restore path. This table was incomplete (missing dozens of types) and ignored any custom attributes set by other plugins or datapacks, silently restoring the wrong range. - Fix: Replaced the hardcoded table withattr.getDefaultValue(), which reads the actual server-side default and therefore works correctly for all entity types including custom ones.
#### Fixed —Medium Fixes
LagEngine—applyDifficultyScaling()had HARD and EASY inverted - Root cause:case HARD → tps + 1.0raised the effective TPS, causing optimizations to trigger later on Hard worlds.case EASY → tps - 1.0lowered it, triggering optimizations earlier on Easy worlds. Both are the opposite of what the logic requires: Hard mobs pathfind more aggressively and consume more CPU; optimizations should therefore activate sooner, not later. - Fix: Swapped the offsets —EASY → tps + 1.0,HARD → tps - 1.0. - Impact: Servers running Hard difficulty worlds will now have mob AI throttled earlier under load, meaningfully reducing the lag window that was previously unaddressed. #### Fixed —WebDashboard— Rate-limit map memory leak on long-running servers - Root cause:rateLimitCountersandrateLimitWindowsonly cleared onstop(). Each unique IP that ever touched the dashboard created a permanent entry. On servers with public web dashboards, scanner/probe traffic could accumulate thousands of entries over days of uptime without any mechanism to reclaim the memory. - Fix: At the start of eachcheckRateLimit()call, entries whose 60-second window has already expired are pruned viaremoveIf, andrateLimitCountersis kept in sync viaretainAll. Cost is amortised O(n) across all incoming requests — negligible compared to the HTTP overhead of each call.
#### Documented —Code Quality
LagEngine—AIThrottlerfield is intentionally unused - The 1.7.0 refactor extractedAIThrottleras a separate class but did not update theapplyAiBatched()call site to delegate to it. The inline throttle logic continued to run usingLagEngine's ownthrottleCounters, leavingAIThrottleras unreachable code with its own duplicate counter map. - This release adds an explicitNOTEcomment on the field explaining why the field exists, why it is not called, and what is required before delegation can be completed safely. No behaviour change — cleanup is deferred to a dedicated refactor release. ---1.7.0NeuroLag 1.7.0May 11, 2026 [1.7.0] — 2026-05-01 — Major Architecture & Algorithm Improvements
- Safe Mode for Critical State - AddedMajor Features
safe-modeconfiguration option under critical TPS tier - ImplementedSafeModeOptimizerto selectively disable dangerous AI components while preserving essential game mechanics - Prevents over-optimization that breaks villager trading, mob escaping water, and other critical behaviors - LagEngine Refactoring - Extracted optimization logic into dedicated classes following Single Responsibility Principle: -MobCuller- Entity culling with intelligent importance scoring -AIThrottler- AI throttling and tick management -SpawnSuppressor- Spawn rate adjustment logic - Improved code maintainability and testability - Event-Driven Architecture - Implemented EventBus pattern for decoupled optimization logic: -OptimizationEventBus- Central event dispatcher -OptimizationEvent- Event data container -OptimizationListener- Interface for event handlers - Enables plugins/addons to react to optimization state changes - Mob Importance Scoring System - CreatedMobImportanceScorerwith comprehensive importance evaluation: - Base scores for all entity types (bosses: 1000, villagers: 100, hostile: 10-20, etc.) - Dynamic scoring factors: named mobs (10x), tamed mobs (20x), equipment (1.5x) - Integration with MobCuller for intelligent culling decisions - Mob Behavior Groups - ImplementedMobBehaviorGroupssystem for targeted optimization: - PASSIVE (low priority): Cows, pigs, sheep, chickens - AGGRESSIVE (high priority): Zombies, skeletons, creepers - NEUTRAL (medium priority): Endermen, iron golems - SPECIAL (preserve): Villagers, bosses, named mobs - AQUATIC (water-based): Dolphins, guardians, squids
- RegionOptimizer Enhancements - Dynamic Region Sizing: Automatically adjusts region size based on player count - 0-5 players: 16 chunks (large regions) - 6-20 players: 8 chunks (medium regions) - 21-50 players: 4 chunks (small regions) - 50+ players: 2 chunks (very small regions) - Hot Region Decay: Regions gradually cool down when players leave - Heat decays at 5% per second when no players present - Prevents regions from staying hot indefinitely - PredictiveScheduler Algorithms - EWMA (Exponentially Weighted Moving Average): Better short-term TPS prediction - Alpha smoothing factor of 0.3 for optimal responsiveness - Linear Regression: Trend analysis for TPS decline detection - Combines simple average, EWMA, and trend for robust prediction - More accurate lag prevention than simple hourly averagesAlgorithm Improvements
- Annotation-Based Validation -Configuration Management
@ConfigValidationannotation for field-level validation rules -ConfigValidatorclass with automatic validation on reload - Validates numeric ranges, required fields, and boundary warnings - Provides clear error messages and validation reports - Config Migration System - Automatic version checking and stepwise migrations - Backup creation before migration with rollback capability - Supports migration of config.yml, features.yml, monitors.yml, systems.yml - Preserves user settings while updating structure
- Comprehensive Config Guide -Documentation
CONFIG-GUIDE.mdwith detailed explanations for all settings - Usage examples, recommended values, and troubleshooting tips - Clear organization by functional areas - Enhanced Config Comments - Added detailed explanations to all YAML configuration files - Section headers and inline comments for better understanding - Security notes and setup instructions where applicable
- Single Responsibility Principle - Each class has a single, well-defined responsibility - Reduced coupling between components - Improved testability and maintainability - Modern Java Practices - Updated deprecated Bukkit method usage - Proper exception handling and logging - Thread-safe data structures where appropriateCode Quality Improvements
- Intelligent Culling - Prioritizes removing low-importance mobs first - Preserves named, tamed, and special mobs - Reduces impact on gameplay while maintaining server performance - Targeted Optimization - Behavior-based optimization strategies - Different approaches for different mob types - More efficient than one-size-fits-all approachPerformance Optimizations
- Seamless Migration - Automatic config updates preserve existing functionality - Graceful handling of missing or corrupt configuration files - No breaking changes to existing setupsBackward Compatibility
- Fixed Memory Leaks - Proper cleanup of event listeners and cached data - Thread-safe collections with proper synchronization - Improved Error Handling - Better exception messages and logging - Graceful degradation when components fail - Validation prevents invalid configurations ---Bug Fixes
1.6.0NeuroLag 1.6.0Apr 29, 2026 1.5.2NeuroLag 1.5.2Apr 23, 2026 [1.5.2] — 2026-04-23 — Bug Fix & Safety Patch
Fixed —
- Critical: wrong `api-version` —plugin.ymlapi-versionwas set to1.5.1(the plugin version) instead of the required Bukkit API version1.21. Paper rejects plugins with a non-standardapi-versionstring, causing the plugin to either fail to load or log a persistent warning on every server start. Changed toapi-version: 1.21.Fixed —
- Token not generated when `monitors.yml` is deleted or web dashboard is disabled.WebDashboardensureStrongToken()was only called after theif (!webDashboardEnabled) returnguard, meaning servers that had the dashboard disabled (or whosemonitors.ymlwas deleted and recreated bysaveResource) would still have the default placeholder token the first time the dashboard was enabled — a silent security hole. -ensureStrongToken()now runs before the enabled check on everystart()call. - Ifmonitors.ymldoes not yet exist,saveResource()is called first to create the file structure before the generated token is written into it.Fixed —
- Protected-zone mobs were counted toward `targetRemoveCount` but never actually removed, causing the cull pass to under-remove and leaving entity counts aboveLagEngine— Culling count wrong when protected zones are presentmaxEntitiesindefinitely on servers with active zone protection. -cull()now pre-filters protected mobs from the candidate pool before computingtargetRemoveCount, so the removal math uses only the actually-cullable mob count. - The redundant zone check inside the removal loop is kept as a race-condition safety net.Fixed —
- No upper bound on `runTaskLater` calls per tick — on worlds with thousands of entities,LagEngine— AI update scheduler saturation on very mob-dense worldsapplyAiBatched()could schedule dozens of batch tasks in a single tick, queuing more work than the scheduler could drain, leading to compounding latency. - AddedAI_UPDATE_PER_TICK_CAP = 80: at most 80 mob AI updates are scheduled per engine tick. The next monitor tick processes the remaining mobs, spreading load evenly.Fixed —
- No per-chunk mob density check — spawning 2 000+ mobs at or near the world spawn could saturate loaded chunks and crash the server within seconds. - Before spawning, the manager now scans a 7×7 chunk area around the target location and compares the current entity count againstStressTestManager— Server crash on large spawns at low-chunk-count locationsstress-test.max-mobs-per-chunk(default: 80). - If the limit would be exceeded, the spawn count is automatically reduced to the safe maximum and a warning is logged. If the area is already at capacity, the command is rejected with a descriptive error message. - New config key insystems.yml:stress-test.max-mobs-per-chunk: 80.Fixed —
- When the MySQL database was down for an extended period,MultiServerSync— MySQL reconnect attempt logged on every polling cycleensureConnected()logged"MySQL connection lost — reconnecting in Xs…"on every poll interval (default every 10 s), flooding the console with hundreds of lines. - Reconnect log messages are now gated behind the same power-of-2 streak filter already used for SQL error warnings (logs on streak 1, 2, 4, 8, 16 …), reducing noise by up to 95% during prolonged outages while still keeping the first occurrence visible.Config changes
---# systems.yml — new in 1.5.2 stress-test: max-mobs-per-chunk: 80 # NEW — per-chunk density safety cap for stress tests1.5.1NeuroLag 1.5.1Apr 20, 2026 [1.5.1] — 2026-04-20 — Code Quality & Performance Patch
Fixed / Improved — ZoneManager
- WorldGuard region cache —getApplicableRegions()was called for every mob on every monitor tick. Queries are now cached per chunk with a 100-tick TTL (ConcurrentHashMap). Cache is invalidated automatically when TTL expires, eliminating excessive WorldGuard API pressure on large servers. - CuboidZone coords changed from `double` to `int` — block-level precision is sufficient; int arithmetic is faster and the record is more memory-efficient. - Zoneinitialize()now clears the WG cache on reload.Fixed / Improved — ProfileManager
- Profile validation before apply — switching to a profile wherecritical-tps ≥ medium-tpsormax-entities < 1now returns a clear error instead of silently corrupting the engine state. - Active profile persisted across restarts — the selected profile name is written toplugins/NeuroLag/active-profile.daton switch and reloaded automatically on startup/reload, so profiles survive server restarts without manual re-selection. -switchProfile()return type changed frombooleantoString(null = success,"NOT_FOUND"or error message = failure) — NeuroLag main command updated accordingly.Fixed / Improved — PredictiveScheduler
- Hand-rolled JSON parser replaced with Gson (bundled by Paper) — the previoussplit/replaceAllparser was fragile and could silently produce wrong data on corrupt files. Gson provides safe serialisation and clean error handling; corrupt files now log a warning instead of producing garbage hourly averages. - Loaded samples are capped to the last 60 per hour on load, not only on record.Fixed / Improved — CpuMonitor
- Graceful fallback for non-Sun JVMs — ifcom.sun.management.OperatingSystemMXBeanis unavailable (GraalVM, some container JVMs), the monitor now falls back toOperatingSystemMXBean.getSystemLoadAverage()normalised by CPU count. If even that is unavailable, the feature disables itself gracefully instead of throwing at construction time. - EMA smoothing (α = 0.3) — single-tick CPU spikes no longer toggle the throttle on/off erratically. The exponential moving average keeps the reading stable under transient load. - Strategy (SUN_PROCESS / SYSTEM_LOAD / DISABLED) is selected once at construction and stored in an enum — no repeatedinstanceofchecks every tick.Fixed / Improved — RegionOptimizer
- Player chunk position cache —refresh()now tracks each player's last known chunk. The HOT/COLD region map is only rebuilt when at least one player has moved to a different chunk since the previous call. On a stable server this eliminates the full-player-scan every monitor tick. -isBeyondPathfindingDistance()uses the cached positions instead of callingworld.getPlayers()a second time per mob check.Fixed / Improved — NeuroLagAPI
- AddedNeuroLagAPI.getInstance()for cleaner third-party plugin integration. - JSON payload sent via plugin message channel now uses Gson instead of manual StringBuilder, eliminating potential escape bugs.Fixed / Improved — LagReporter (Discord)
- Retry with exponential back-off — Discord webhook requests are retried up to 3 times (delays: 1 s → 2 s → 4 s) before giving up. Transient network errors and Discord 429 rate-limit responses no longer silently drop notifications. - Discord embed payload now built with Gson — no more manual string escaping.Fixed / Improved — StressTestManager
- Confirmation prompt for spawns > 1 000 mobs — the sender must repeat the command within 30 seconds to confirm. Prevents accidental large spawns. - Multiple entity types —stress-test.entity-typesconfig list (default: ZOMBIE, SKELETON, CREEPER) is cycled round-robin across spawned mobs, producing a more realistic mixed load. Invalid or non-spawnable type names log a warning and are skipped.Fixed / Improved — LagEngine
- Added internal processing metrics:lastTickMobCountandlastTickProcessingMs. Visible in/nlag status("Last Tick: N mobs, X ms"). -ZoneManager.tick()is now called once per engine tick to advance the WG cache TTL counter.Fixed / Improved — WebDashboard
- Rate limiting now also coversGET /(the HTML dashboard page), not only/api/*endpoints. - Token auto-generation log output upgraded toSEVERElevel and formatted as a clearly visible bordered block so admins cannot miss the new token in the console.Fixed / Improved — ConfigManager / ConfigValidator
- Addedstress-test.entity-typeslist field. -ConfigValidatornow checksentity-typeslist is non-empty when stress test is enabled.Config changes (
systems.yml)
---stress-test: entity-types: # NEW — 1.5.1 - ZOMBIE - SKELETON - CREEPER1.5.0NeuroLag 1.5.0Apr 19, 2026 [1.5.0] — 2026-04-19 — Security Hardening & Stability Release
Fixed — Security
- [Bug #1] Web dashboard weak default token / no rate limiting / no IP filtering (WebDashboard.java,ConfigManager.java,monitors.yml) - Auto-generates a cryptographically strong 24-byte random token on first startup whenever the default placeholder"change-this-token-now"is detected. The new token is immediately persisted tomonitors.ymland printed to the console. - Added per-IP rate limiting (sliding 60-second window, configurable viaweb-dashboard.rate-limit.max-requests-per-minute, default 60). Returns HTTP 429 when the limit is exceeded. - Added optional IP allow-list (web-dashboard.ip-whitelist, disabled by default). When enabled, only explicitly listed IPs can reach/api/statusand/api/cmd.Fixed — Stability
- [Bug #2] Stress test could spawn unlimited mobs with no cooldown (StressTestManager.java,ConfigManager.java,systems.yml) - Hard cap: mob count is clamped tostress-test.max-mob-count(default 2 000) regardless of the value passed to/nlag stresstest. The sender is notified when the cap applies. - Cooldown: a configurablestress-test.cooldown-seconds(default 300) must elapse between tests. Attempting to start a test during cooldown shows the remaining time. - Both limits are enforced byConfigValidator. - [Bug #3] Redis subscriber join(3000) always timed out on slow networks (MultiServerSync.java) -stop()now holds avolatilereference to the activeJedisPubSubinstance and callspubSub.unsubscribe()beforeinterrupt()+join(). This signals the blockingjedis.subscribe()call to return immediately, sojoin()completes in milliseconds rather than timing out. Prevents connection-pool leaks during rapid/nlag reloadcycles. - [Bug #4] Smart culling could remove hundreds of entities in one pass → lag spike (LagEngine.java) - AddedCULL_PER_TICK_CAP = 50— at most 50 entities are removed per cull invocation. If the entity count remains abovemax-entities-per-worldafter one pass, the next monitor tick handles the remainder. Eliminates the single-frame mob-removal lag spike seen on servers with thousands of entities. - [Bug #5] Predictive scheduler lost all historical data on server restart (PredictiveScheduler.java) - Hourly TPS samples are now saved toplugins/NeuroLag/predictive-data.jsononstop()(server shutdown or/nlag reload) and reloaded onstart(). No external library required — uses a compact hand-rolled JSON serializer/parser. The predictor now accumulates knowledge across restarts and becomes effective much faster on busy servers. - [Bug #6] Full plugin reload caused noticeable server stutter (NeuroLag.java) -reloadPluginState()now takes config snapshots before reloading and selectively restarts only the services whose configuration sections actually changed (web dashboard, multi-server sync, predictive scheduler, CPU monitor, boss-bar dashboard). The main monitor task and engine throttle are always restarted cleanly. On a typical/nlag reloadthat only changes TPS thresholds, zero external services are bounced, eliminating the stutter caused by restarting Redis/MySQL connections unnecessarily.Changed
-ConfigValidatornow validates the new stress-test limits and rate-limit settings. -systems.yml— addedstress-test.max-mob-countandstress-test.cooldown-seconds. -monitors.yml— addedweb-dashboard.rate-limitandweb-dashboard.ip-whitelistsections. ---1.4.1NeuroLag 1.4.1Apr 18, 2026 [1.4.1] — 2026-04-18 — Bug Fix Release
Fixed — Critical
- Task leak on reload (`/nlag reload`) —BackupManager.start()was called twice inonEnable()(once directly, once viastartRuntimeServices()), causing every scheduled task to be registered a second time on reload. The duplicate direct call has been removed; the initial backup is now triggered asynchronously insidestart()when no backups exist.stopRuntimeServices()now also callsengine.cancelAllPendingBatchTasks()before stopping the throttle task, ensuring all in-flightrunTaskLaterbatch tasks are cancelled before any new tasks are registered. (LagEngine,NeuroLag) - `collectTargets()` running every tick on the main thread —LagEngine.collectTargets()calledworld.getLivingEntities()on every monitor tick, causing significant lag spikes on servers with large mob populations. The result is now cached per-world and rebuilt at most once every 4 ticks (~0.2 s). The cache is invalidated onrestoreAll()and on world state transitions. (LagEngine) - FOLLOW_RANGE not fully restored for protected-zone mobs —applyAiBatched()setAI = truefor protected mobs but did not always restoreFOLLOW_RANGEto its default value, so mobs could permanently retain a reduced follow range after leaving a zone. The fix unconditionally callsattr.setBaseValue(attr.getDefaultValue())for every protected mob encountered. Additionally, a newrestoreWorld(World)helper is called whenever a world transitions back toNORMAL, guaranteeing a full attribute restore even for mobs that were never re-processed by the batch scheduler. (LagEngine) - Manual override (`/nlag toggle`) not restoring mobs correctly — in-flightrunTaskLaterbatch tasks scheduled byapplyAiBatched()could execute afterrestoreAll()and re-apply AI restrictions or reduced follow ranges, leaving mobs frozen.handleToggle()now callsengine.cancelAllPendingBatchTasks()beforeengine.restoreAll()so no pending task survives the toggle. (LagEngine,NeuroLag)Fixed — High
- WebDashboard query-string token auth — passing?token=...in the URL is insecure (tokens appear in server access logs, browser history, and HTTP referrer headers). The query-string fallback is now disabled by default. A new config keyweb-dashboard.auth.allow-query-token(defaultfalse) must be explicitly set totrueto re-enable it. The existing warning is preserved and now also states the config key needed to disable the fallback permanently. (WebDashboard,ConfigManager,monitors.yml) - Redis subscriber thread not shutting down gracefully —MultiServerSync.stop()calledredisSubThread.interrupt()but returned immediately, so the thread could still be holding a Jedis resource whenjedisPool.close()ran, causing pool-exhaustion exceptions in the server log on every reload. The fix addsredisSubThread.join(3000)afterinterrupt(), giving the thread up to 3 seconds to exit cleanly before the pool is closed. (MultiServerSync) - MySQL reconnect logic throwing repeatedly when DB is down —ensureConnected()calledDriverManager.getConnection()immediately on every sync cycle failure, flooding the log with stack traces. The fix introduces an atomic error-streak counter and an exponential back-off (sleep time =min(streak * 2, 30)seconds before reconnect). Log output now uses a power-of-two gating strategy (log on streak 1, 2, 4, 8, 16, …) to avoid noise during prolonged outages. (MultiServerSync) - Batched AI task delay not capped — with 5 000+ mobs the delay between batches could reach 100 ticks (5 seconds), making mobs visibly unresponsive. The delay is now capped at 20 ticks (1 second) regardless of entity count. (LagEngine) - Smart culling could remove protected-zone mobs — the culling loop checkedzoneManager.isProtected()only in the main optimization path, not insidecull()itself. Mobs inside protected zones can now never be removed by smart culling. (LagEngine) - BackupManager not backing up the `lang/` directory — the ZIP bundle only included root-level.ymlfiles. Custom language files stored inplugins/NeuroLag/lang/would be lost on restore.collectConfigFiles()now recursively includeslang/*.ymlentries andrestoreZip()correctly recreates thelang/subdirectory on restore. (BackupManager) ---1.4.0NeuroLag 1.4.0Apr 14, 2026 [1.4.0] — Stability + lifecycle fix release
Fixed
- Removed the command-level permission wall inplugin.ymlso feature-specific permissions can actually work. - Reworked/nlag toggleso manual override now restores mobs immediately and stops active throttling instead of leaving old optimization state hanging. - Reworked/nlag reloadto stop and restart runtime services cleanly, including CPU monitor, predictive scheduler, web dashboard, backup scheduler, multi-server sync, and monitor tasks. - Multi-server sync now clears stale peers and restarts cleanly on reload. - Protected-zone mobs are now excluded from smart culling and haveFOLLOW_RANGErestored to defaults when encountered during optimization. - OngoingMEDIUMandCRITICALstates now keep reapplying optimization passes on later monitor ticks, so movement into protected zones / hot zones / player zones is handled more consistently. - Stress-test mobs no longer give themselves a custom name, so they are no longer accidentally excluded by the named-mob whitelist. - Backup system now stores full zip bundles of NeuroLag YAML files instead of only copyingconfig.yml. - Added restore-by-name support for/nlag backup restore <file>. - Memory-pressure config now normalizes legacy percentage values above1.0, and defaults were corrected to ratio format (0.80). - Player-scaling ratio is now clamped to avoid negative threshold offsets when online players are below the configured minimum. - Predictive scheduler now clears parsed peak-hour ranges on restart/reload to avoid duplicate entries. - Zone manager now fully resets cached zone and WorldGuard state when the feature is disabled or reloaded. - Web/API JSON generation now escapes keys/values properly and uses stable decimal formatting. - Web auth query token parsing is stricter and only logs the fallback warning once. - CPU monitor now resets stale displayed values when stopped or disabled. - BossBar dashboard now respectsdashboard.bossbar.nameanddashboard.bossbar.colorfrommonitors.yml. - Metrics API plugin-message registration now reads the correct split config source.Docs
- Updated README to reflect the real split-config layout. - Updated README examples forweb-dashboard,multi-server,zone-protection,config-profiles, and backup restore. - Updated language file version headers tov1.4.0.1.3.1NeuroLag 1.3.1Apr 12, 2026 [1.3.1] — Bug Fix Release
- [CRITICAL] FOLLOW_RANGE stuck at 0 after mob returns near player Mobs whoseFixed
FOLLOW_RANGEwas zeroed by the pathfinding-distance optimiser were never restored when they re-entered a player's chunk radius. They would remain AI-enabled but permanently unable to pathfind, appearing frozen. Fix: restoreFOLLOW_RANGEtodefaultValue × multiplierinside thenearPlayer || hotRegionbranch ofapplyAiBatched(). - [CRITICAL] ConcurrentModificationException on `tpsHistory` between main thread and HTTP threadtpsHistorywas anArrayDeque— not thread-safe. The Bukkit main thread writes to it every tick while the Web Dashboard HTTP thread pool iterates it on every/api/statusrequest, causing intermittent exceptions. Fix: replaced withConcurrentLinkedDeque. AddedvolatiletotpsSum,tpsCount,criticalActivations, andmediumActivationsfor JMM visibility. - [CRITICAL] MySQL connection silently dies after DB restart or idle timeout A singleConnectionwas reused indefinitely. When MySQL restarted or timed out, all subsequent sync calls threwSQLExceptionsilently, leaving multi-server sync permanently broken with no visible warning. Fix: addedensureConnected()that checksisClosed()and reconnects automatically before eachupsertMysql()/readPeersMysql()call. - [MEDIUM] autoRestoreOnError never works on first plugin startup The backup-restore safety net checked for existing backups before any had been created, so it could never restore on a fresh install. Fix:doBackup()is now called immediately at startup before the check. - [MEDIUM] StressTestManager.finish() could run twice, emitting duplicate audit reports If the Bukkit scheduler fired the deferredfinish()in the same tick as an earlystop()call, both executions would complete and emit an audit report. Fix:finish()returns immediately ifrunningis alreadyfalse. - [MEDIUM] Web API /api/cmd whitelist bypassable via prefix matchingbody.startsWith(a)allowed inputs like"reloadEvil"to pass the filter. Fix: the first token is extracted and matched exactly against the allowlist.
- Web auth token warned when passed via URL query paramSecurity
?token=xxxleaks into browser history and proxy logs.Authorization: Bearerheader is now the primary path; query-param auth logs a one-time warning.
- Redis publisher now uses JedisPool A fresh TCP connection was opened and closed every 5 seconds. A boundedPerformance
JedisPool(max 8 / idle 2) is created at startup and shared by publisher and subscriber, eliminating per-publish connection overhead. ---1.3.0NeuroLag 1.3.0Mar 15, 2026 [1.3.0] — 2026-03-15
#### BUG-A — ZoneManager: world name dropped from cuboid zones (cross-world contamination) - Root cause:Bug Fixes (9 fixes)
ZoneManager.initialize()parsed zone entries as"world x1 y1 z1 x2 y2 z2"(7 parts) but stored onlyparts[1]..parts[6]in a rawdouble[], silently discardingparts[0](the world name). - Effect: A zone defined in worldsurvivalwould also protect mobs at the same coordinates inworld_nether,world_the_end, and any other loaded world. Mobs in unintended worlds were immune to optimization. - Fix: ReplacedList<double[]>withList<CuboidZone>whereCuboidZoneis a JavarecordholdingString world+ 6 coordinates.isProtected()now checksmob.getWorld().getName().equals(z.world())before testing coordinates. #### BUG-B — RegionOptimizer: negative chunk coordinates mapped to wrong region - Root cause: Region index was computed aschunkX / regionSizeusing Java integer division, which truncates toward zero. Chunk-1 / 16 = 0and chunk1 / 16 = 0, so chunks in the negative quadrant near spawn mapped to the same region keys as their positive counterparts. - Effect: The HOT region around coordinate origin (0,0) was effectively double-sized. Mobs at negative chunk coordinates near spawn were optimized even when a player was present nearby. - Fix: Replaced/withMath.floorDiv()in bothrefresh()andisHot().Math.floorDiv(-1, 16) = -1(correct),Math.floorDiv(15, 16) = 0(correct). #### BUG-C — DashboardManager:type: HOLOGRAMsilently did nothing - Root cause:DashboardManager.start()returned early withif (!dashboardType.equals("BOSSBAR")) return— no log message, no error. Admins who setdashboard.type: HOLOGRAMsaw no dashboard and received no indication why. - Fix: Added an explicitplugin.getLogger().warning()message when a non-BOSSBAR type is configured, clearly stating that only BOSSBAR is currently supported. #### BUG-D — BackupManager:creationTime()unreliable on Linux (ext4) - Root cause: Backup rotation usedFiles.readAttributes(...).creationTime()to sort backups oldest-first. The ext4 filesystem does not store inode creation time — it returnsInstant.EPOCH(1970-01-01) for all files, making sort order undefined. - Effect: On Linux servers, the "oldest" backup was selected randomly. The wrong backup could be deleted or restored. - Fix: ReplacedcreationTime()withFiles.getLastModifiedTime(), which is reliably stored on all filesystems. Also removed the now-unusedBasicFileAttributesimport. #### BUG-E — StressTestManager: always spawned atworld[0]spawn, ignoring admin's location - Root cause:start()hardcodedBukkit.getWorlds().get(0).getSpawnLocation()as the spawn center regardless of where the admin was or which world they were in. - Effect: Running/nlag stresstestfrom the Nether or End spawned mobs in the Overworld at spawn, making the test meaningless for other worlds. - Fix:start()now accepts aCommandSenderparameter. If the sender is aPlayer, mobs spawn centered on the player's current location in their current world. Console fallback remainsworld[0]spawn. #### BUG-F — WebDashboard: POST/api/cmdblocked by CORS preflight (OPTIONS) - Root cause: Browsers send an HTTPOPTIONSpreflight request before a cross-originPOST. The server had no handler forOPTIONSand returned405 Method Not Allowed, causing the browser to abort the actualPOST. - Effect: The "send command" button in external web dashboards or REST clients always failed silently. - Fix: AddedsendCorsOptions()helper that returns204 No ContentwithAccess-Control-Allow-Methods: GET, POST, OPTIONSandAccess-Control-Allow-Headers: Authorization, Content-Type. Both/api/statusand/api/cmdnow handleOPTIONSbefore auth checks. #### BUG-G — AuditManager:getLivingEntities()/getLoadedChunks()called on main thread - Root cause:snapshot()iterated all entities and chunks synchronously on the main thread before handing off to async write. - Effect: On servers with many mobs or chunks, this could stall the main thread for several milliseconds during audit generation. - Mitigation: Added an explicit code comment documenting this limitation and the reason it is required by the Bukkit API. A full async snapshot would require a thread-safe entity iterator not currently available in Paper's public API. #### BUG-H — ProfileManager:clearProfile()required a fullcfg.reload()to restore values - Root cause:switchProfile()overwrotecfg.tpsCritical,cfg.tpsMedium, andcfg.maxEntitiesdirectly.clearProfile()only setactiveProfile = nulland left a comment saying "caller is responsible for reloading", whichNeuroLag.javaimplemented by callingcfg.reload() + engine.restoreAll() + startMonitor()— a heavy operation that re-read disk and restarted all tasks. - Fix:ProfileManagernow saves the three base values insaveBaseValues()(called in the constructor and after everycfg.reload()).clearProfile()restores them directly — no reload required./nlag profile clearno longer triggers a full config reload cycle. #### BUG-I — LagEngine: "Animation Freezing" comment/name mismatched actual behavior - Root cause: Feature F4 was named "Animation Freezing" throughout the codebase, but the implementation only calledmob.setVelocity(0,0,0). This stops movement drift but does not freeze animation frames — mobs still visibly idle-animate. - Fix: Renamed the in-code comment to "Velocity Freeze" and added a note explaining that true animation-frame control requires NMS/packet-level access not available through the standard Bukkit API.
-Other Changes
plugin.yml: version bumped to 1.3.0; permission descriptions clarified;neurolag.stresstestdescription now mentions mobs spawn at your location -pom.xml: version bumped to 1.3.0 -StressTestManager.start()signature changed tostart(int count, int durationMinutes, CommandSender sender)— callers updated inNeuroLag.java-ProfileManager.saveBaseValues()is now public soNeuroLag.javacan call it after/nlag reload---1.2.0NeuroLag 1.2.0Mar 14, 2026 [1.2.0] — 2026-03-14
Every feature listed in the README and CHANGELOG since v1.1.0 now has real working code. #### New Java Classes (15 new files) | Class | Feature | |---|---| |All 18 Advertised Features — Now Fully Implemented
CpuMonitor.java| F1 — CPU throttling viacom.sun.management.OperatingSystemMXBean| |RegionOptimizer.java| F2 — 16×16 chunk region grid, HOT/COLD classification | |MobWeightManager.java| F3 — Per-type weight budget per chunk | |DashboardManager.java| F6 — Live BossBar (BLUE→YELLOW→RED) for all operators | |AuditManager.java| F7 — Full HTML audit report (specs, plugins, mobs, chunks) | |MultiServerSync.java| F8 — Redis Jedis pub/sub + MySQL JDBC upsert | |WebDashboard.java| F10 — Embedded HTTP server (JDKHttpServer), live JS chart, JSON API | |PredictiveScheduler.java| F11 — Per-hour TPS pattern tracking + peak-hour config | |ZoneManager.java| F12 — Cuboid zone list + WorldGuard region soft-depend | |ProfileManager.java| F14 — Instant profile switching (critical-tps / medium-tps / max-entities) | |AlertManager.java| F15 — Sound + particle + chat alerts for CRITICAL enter/leave | |StressTestManager.java| F16 — Mob spawning stress test with auto-cleanup and report | |ConfigValidator.java| F17 — Range/sanity checks for all config fields | |BackupManager.java| F18 — Periodic backup + purge + restore | |NeuroLagAPI.java| F5 — Static public API + plugin messaging channelneurolag:metrics| #### Features Integrated into Existing Classes | Feature | Location | |---|---| | F4 — Animation Freezing (velocity zeroing for distant AI-disabled mobs) |LagEngine.applyAiBatched()| | F9 — AI Difficulty Scaling (getDifficulty()→ TPS offset) |LagEngine.applyDifficultyScaling()| | F13 — Smart Group Culling (type-aware, min-count guard, POOF particles) |LagEngine.cull()| | F1 TPS penalty integration |LagEngine.tick()| | F2 region check in optimization path |LagEngine.applyAiBatched()| | F3 weight-sorted culling |LagEngine.cull()| | F7 audit on critical event |LagReporter.onCriticalStart()| | F12 zone protection skip |LagEngine.applyAiBatched()| | F11 predictive penalty |LagEngine.tick()| | F15 alert on state change |LagEngine.updateWorld()| #### New Commands -/nlag dashboard [off]— toggle BossBar -/nlag audit— generate HTML audit report -/nlag zone— show loaded zone count -/nlag profile [name|clear]— switch config profile -/nlag validate— validate config with detailed errors/warnings -/nlag backup [list|restore]— manage backups -/nlag stresstest [count] [minutes]— run stress test -/nlag sync— show Redis/MySQL peer server states #### pom.xml Changes - Jedis 5.0.0 (Redis) — shaded and relocated - mysql-connector-j 8.3.0 — shaded and relocated - WorldGuard 7.0.12 — provided/optional (soft-depend) - Maven Shade plugin configured with relocation rules #### plugin.yml Changes -softdepend: [WorldGuard]added #### config.yml Changes -dashboard.enabledanddashboard.update-intervaladded -audit-reports.generate-on-criticaladded -multi-server.mysql.*section added -zone-protection.zoneslist added -config-profiles.profiles.*.medium-tpskey added -alerts.enabledtop-level flag added -stress-test.auto-generate-reportadded #### Language Files - All 7 language files updated to v1.2.0 header - New keys:dashboard-bar,alert-critical,alert-recovery,sync-no-peers,sync-peer---1.1.0NeuroLag 1.1.0Mar 14, 2026 [1.1.0] — 2026-03-14
Major Release: 18 New Advanced Features!
#### Feature 1: CPU Throttling Mode - Monitors server CPU usage (not just TPS) - Activates automatic optimization when CPU > 80% - Reduces Bukkit task frequency during critical CPU load - Disables non-essential block physics updates - Configuration:Added
cpu-throttling.enabledandcpu-throttling.cpu-threshold#### Feature 2: Region-Based Optimization - Splits world into 16×16 chunk regions - Disables pathfinding for mobs in far regions - Smart regional mob optimization instead of global - Mobs near players always keep full AI - Configuration:region-optimization.enabledandregion-optimization.use-regions#### Feature 3: Custom Mob Tier Weights - Assign different "cost" to different mob types - Zombies cost 1.0, Endermen cost 2.0, Ender Dragons cost 4.0 - Prevents over-optimization (allows more weak mobs) - Configuration:mob-weights.weights.*andmob-weights.max-weight-per-chunk- Result: More realistic mob balance during lag #### Feature 4: Animation Freezing - In CRITICAL state, mobs stop playing animations (head turning, arm swinging) - Only applies to distant mobs (configurable) - Reduces visual strangeness of frozen mobs - Configuration:animation-freezing.enabledandanimation-freezing.freeze-distance-chunks#### Feature 5: Real-Time Metrics API - Other plugins can query NeuroLag's current state - Methods:neurolag.getWorldState(),neurolag.getTPS(),neurolag.getAffectedMobCount()- Enable plugin ecosystem around NeuroLag - Configuration:metrics-api.enabledandmetrics-api.expose-via-plugin-message#### Feature 6: In-Game Dashboard - Live server health dashboard (BOSSBAR or HOLOGRAM) - Changes color: BLUE (normal) → YELLOW (MEDIUM) → RED (CRITICAL) - Updates every 2 seconds - Configuration:dashboard.type,dashboard.bossbar,dashboard.hologram#### Feature 7: Detailed Lag Audit Reports - Generate comprehensive lag analysis reports - Include: server specs, plugin list, chunk stats, mob breakdown, player behavior, network stats - Export to HTML for easy reading - Configuration:audit-reports.enabledandaudit-reports.include- Result: Deep understanding of what causes lag #### Feature 8: Multi-Server Sync (Bungeecord/Velocity) - Share TPS data across all servers - Redis or MySQL backend support - Cascade warnings to all servers if one is in CRITICAL - Load-balance: suggest players move to less-lagged server - Configuration:multi-server.enabled,multi-server.backend,multi-server.sync-tps#### Feature 9: AI Difficulty Scaling - Easy mode = aggressive optimization - Normal mode = balanced - Hard mode = minimal optimization (players want challenge) - Hardcore = zero optimization - Configuration:ai-difficulty-scaling.enabledandai-difficulty-scaling.scale-with-difficulty- Result: Respects player expectations #### Feature 10: Mobile Web Dashboard - Access metrics from any browser (phone, tablet, PC) - Real-time TPS graph, mob count, heap usage - Send commands remotely (/nlag reload,/nlag toggle) - Token-based authentication - Configuration:web-dashboard.enabled,web-dashboard.port,web-dashboard.auth.token- Result: Monitor and control server on the go#### Feature 11: Predictive Lag Prevention - Learns hourly patterns (6pm = always lag, etc) - Pre-activates optimization before peak hours hit - Configuration:
predictive-prevention.enabled,predictive-prevention.peak-hours- Result: Be proactive, not reactive #### Feature 12: Custom Zones (WorldGuard Integration) - Mark important regions as HIGH_PRIORITY via WorldGuard - Examples: boss arenas, spawn, player shops, farms - Full mob AI always kept in protected zones - Aggressive optimization elsewhere - Configuration:zone-protection.enabledandzone-protection.integrate-worldguard- Result: Protect what matters most #### Feature 13: Entity Grouping & Smart Removal - Remove mobs intelligently during culling - Never remove single mob types (won't inactivate farms) - Remove in groups (visually less obvious) - Particle effect on removal - Configuration:smart-culling.enabled,smart-culling.cull-in-groups,smart-culling.min-type-before-cull#### Feature 14: Configuration Profiles - Create multiple config profiles (survival, minigame, peaceful, etc.) - Switch instantly with/nlag profile <n>- Each profile can have different TPS triggers and entity limits - Configuration:config-profiles.enabledandconfig-profiles.profiles.*- Result: Perfect for multi-mode servers #### Feature 15: Audio & Visual Alerts - Sound alerts when entering/leaving CRITICAL - Particle warnings around admin - Chat notifications to all ops - Customizable sounds (default: bass drop for CRITICAL, pling for recovery) - Configuration:alerts.enable-sound-alerts,alerts.alert-sounds.*,alerts.enable-particle-warnings- Result: Immediate awareness without checking commands #### Feature 16: Stress Test Mode - Simulate heavy server load without real players - Spawn fake mobs (configurable count) - Test for X minutes and auto-generate report - Configuration:stress-test.enabled,stress-test.spawn-fake-mobs,stress-test.fake-mob-count- Result: Safe testing environment#### Feature 17: Configuration Validator -
/nlag validatechecks config syntax and values - Warns about invalid settings - Suggests optimizations - Configuration:config-validator.enabled- Result: Prevent config errors before they cause problems #### Feature 18: Automatic Config Backup - Auto-backup config every X minutes (default: 60) - Keep last N backups (default: 10) - Auto-restore if invalid config detected - Configuration:auto-backup.enabled,auto-backup.backup-interval-minutes,auto-backup.keep-backups- Result: Never lose your config
- English (EN) — Default - Tiếng Việt (VI) — Vietnamese - Español (ES) — Spanish - Français (FR) — French - Deutsch (DE) — German - 日本語 (JA) — Japanese - 中文 (ZH) — Chinese (Simplified) Set language inMultilingual Support (Added)
config.yml:settings.language: EN
- Completely rewritten README with all 18 features documented - Multilingual documentation in README (7 languages) - Comprehensive CHANGELOG (this file) - Detailed config.yml with all features documentedDocumentation
New commands added: -Command Enhancements
/nlag dashboard— Show in-game dashboard -/nlag audit— Generate audit report -/nlag zone— Zone management -/nlag profile <n>— Switch config profiles -/nlag validate— Validate configuration -/nlag backup— Manage config backups -/nlag stresstest— Run stress test
New permissions added: -Permission Enhancements
neurolag.stresstest— Run stress tests -neurolag.dashboard— View dashboard -neurolag.audit— View audit reports -neurolag.zone— Manage zones -neurolag.profile— Switch profiles -neurolag.validate— Validate config -neurolag.backup— Manage backups -neurolag.web— Access web dashboard -neurolag.api— Access metrics API
- Added 18 new configuration sections (one per feature) - All features can be individually enabled/disabled - Backward compatible with v1.0.6 configs - Old config keys still work (will be migrated automatically)Configuration Changes
- CPU throttling reduces unnecessary task execution - Region-based optimization replaces global optimization - Smart culling reduces entity processing - Predictive prevention prevents lag spikes before they happenPerformance Improvements
-Bug Fixes (from v1.0.6)
Tick-rate throttling properly activates in MEDIUM state -
Manual override (
/nlag toggle) now truly pauses monitoring -Simulate mode no longer throws errors on invalid input -
Recovery notifications always fire (not suppressed by cooldown) -
Stale cooldown timestamps cleared on reload
- **VersioVersion Info
1.0.6NeuroLag 1.0.6Mar 10, 2026 [1.0.6] — 2025-03-11
Fixed
- Bug — Tick-Rate Throttling (Feature 2) never activated InapplyAiBatched,shouldHaveAiwas alwaystruefor MEDIUM state becauseglobalAiOn = !state.equals("CRITICAL")evaluates totrue. The throttle condition!shouldHaveAiwas therefore alwaysfalse, so distant mobs in MEDIUM were silently given full AI instead of being throttled. Fix: chunk proximity is now evaluated independently first. Near-player mobs always get full AI; distant mobs in MEDIUM state enter the throttle queue; CRITICAL mobs getsetAI(false)as intended. - Bug — `/nlag toggle` did not actually pause monitoring SettingmanualOverride = truehad no effect ontick()— the scheduler task continued running. Fix:monitorTask.cancel()is now called when pausing;startMonitor()is called when resuming (existing behaviour). - Bug — `/nlag simulate clear` threw `NumberFormatException` Tab-complete suggested"clear"as a valid argument, but the code passed it directly toDouble.parseDouble(), crashing with an unhandled exception. Fix: an explicitequalsIgnoreCase("clear")check now runs before the parse. - Minor — Recovery (NORMAL) action bar could be suppressed by cooldown The 5-second notify cooldown was applied to all state transitions, including CRITICAL → NORMAL recovery. If a CRITICAL message had just been sent, admins would miss the recovery notification entirely. Fix: cooldown only throttles MEDIUM/CRITICAL spam; NORMAL recovery always fires. - Minor — `notifyTimes` map not cleared on `restoreAll()` Stale cooldown timestamps persisted across/nlag reloadand plugin restarts, causing the first post-reload notification to be silently dropped. Fix:notifyTimes.clear()added torestoreAll(). ---[1.0.5] — 2025-03-10
Added
- Feature 1 — Chunk-Based AI Throttling Mobs within a configurable chunk radius of any online player always retain their AI, even in CRITICAL state. Only mobs in truly unobserved chunks are disabled. Controlled bychunk-ai.enabledandchunk-ai.distance-chunks. - Feature 2 — Tick-Rate Throttling In MEDIUM state, instead of hard-disabling mob AI, a dedicated per-tick task cycles through distant mobs and enables their AI for exactly 1 tick every N ticks. Mobs appear sluggish rather than completely frozen, which feels far more natural in-game. Controlled bytick-throttle.enabledandtick-throttle.ticks-per-ai-tick. - Feature 3 — Spawn Rate Suppression During MEDIUM or CRITICAL lag, world monster and animal spawn caps are temporarily lowered to reduce new mob generation. Limits are fully restored on recovery. Controlled byspawn-suppression.*. - Feature 4 — Per-Player Action Bar Notification When a player has affected mobs within a configurable radius, they receive a personal action bar message explaining why nearby mobs seem different. Previously only ops received any notification. Controlled byper-player-notify.*. - Feature 5 — `/nlag simulate <tps>` Overrides the TPS value used by the engine without affecting the real server. Allows admins to test threshold configurations, Discord alerts, and reports without needing actual server lag. Running/nlag simulatewith no argument clears the override. - Feature 6 — Auto Lag Reports After recovering from a CRITICAL event that lasted longer thanmin-duration-seconds, a timestamped report is written toplugins/NeuroLag/lag-reports/. Each report includes world name, duration, lowest TPS reached, recovery TPS, affected mob count, online player count, and JVM heap statistics. - Feature 7 — Entity Whitelist SpecificEntityTypenames can be added totargets.whitelist-typesto permanently exempt them from all optimization and culling. Additionally,protect-named-mobsandprotect-tamed-mobsoptions prevent NeuroLag from touching player pets, named mobs, and boss entities. - Feature 8 — Discord Webhook Posts a rich Discord embed when a world enters CRITICAL lag and when it recovers. The recovery embed includes total CRITICAL duration and the lowest TPS reached. Uses Java 11+HttpClient— no external library required. Controlled bydiscord.*. - Feature 9 — Memory Pressure Detection Reads JVM heap usage ratio at each TPS check. When heap exceedstrigger-percent, an additional offset is subtracted from effective TPS before threshold evaluation, causing NeuroLag to act more aggressively when RAM is nearly exhausted. Controlled bymemory-pressure.*. - Feature 10 — Player-Count Scaling TPS thresholds are linearly scaled upward as the number of online players increases betweenmin-playersandmax-players. At maximum players, all thresholds shift up bymax-threshold-offsetTPS. Per-world threshold overrides are scaled the same way. Controlled byplayer-scaling.*. - `/nlag simulate` tab-completion — suggests common TPS values (5, 10, 15, 18, 20). - Heap stats in `/nlag` help panel and `/nlag status` — shows used/max MB and percentage. - World state icons in `/nlag status` —●NORMAL,▲MEDIUM,✖CRITICAL. - `/nlag toggle` now calls `restoreAll()` before resuming the monitor, ensuring any frozen mobs are immediately unfrozen.1.0.4NeuroLag 1.0.4Mar 10, 2026 [1.0.4] — 2025-03-10
Fixed
- Deprecated BungeeCord API removed.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(...))was replaced with Paper's native Adventure API:player.sendActionBar(LegacyComponentSerializer.legacyAmpersand().deserialize(...)). The old API is not available on Paper 1.21.3 and would cause a crash or silent failure on action bar notifications. - `pom.xml` version mismatch fixed.<version>was1.0.0whileplugin.ymldeclared1.0.3, causing Maven to produceNeuroLag-1.0.0.jarinstead of the expected filename. - Hysteresis buffer is now configurable. The recovery buffer (0.5) was hardcoded incomputeStatus(). It is now read fromsettings.hysteresis-bufferinconfig.yml. - `/nlag graph` was undocumented. Added toplugin.ymlusage string and to the help message shown by/nlag. - `shouldOptimize` explicit cast removed. The(Mob) entitycast afterinstanceof Mobcheck was unnecessary; replaced with pattern-matchinginstanceof Mob mobat the call site. - `toggle` command no longer leaves mobs frozen. When manual override is turned off,restoreAllAI()is now called before resuming the monitor task so any frozen mobs are immediately unfrozen. - TPS value capped at 20.0 before storing and displaying, preventing artificially high values (Paper can briefly report >20 TPS) from skewing the graph and average. - `logEnabled` now logs state transitions, including world name, new state, current TPS, and affected mob count — more useful for diagnosing server lag patterns. - `onDisable` log message added to confirm AI restoration on server shutdown.Changed
-config.ymlcomments rewritten in English and expanded with usage notes for each option. -plugin.ymlusage string updated to list all four subcommands:reload,status,toggle,graph. -computeStatusrefactored to useswitchexpression (Java 14+) for readability. -drawGraphimproved: empty cells now render as░instead of a space, making the chart easier to read in chat. -statuscommand now displays per-world states with a(no data yet)fallback when the monitor hasn't run yet. - AddedREADME.mdandCHANGELOG.md. ---1.0.3NeuroLag 1.0.3Mar 7, 2026 fixed1.0.2NeuroLag 1.0.2Mar 7, 2026
All notable changes to the NeuroLag plugin in this version are documented below. ---Changelog - NeuroLag v1.0.2
[1.0.2] — 2026-03-07
Entity Batch Processing: AI updates are now processed in batches of 50 entities per tick*. This eliminates the "main thread spike" previously caused by iterating through hundreds of mobs simultaneously during state changes. Improved Loop Efficiency:* Refactored entity filtering and collection to be more streamlined and performant.Performance Optimizations
State Hysteresis: Implemented a 0.5 TPS buffer zone* for state transitions. This prevents "jitter" and notification spam when the server's TPS fluctuates near the 18.0 (Medium) or 15.0 (Critical) thresholds. API Compatibility Fixes: Resolved compilation and runtime issues by ensuring compatibility with the Paper 1.21.1* attribute system, while maintaining safe fallbacks for older server environments.Stability Improvements
Performance Statistics:* Session Average TPS:* Tracks the overall server performance since the last reload/startup. Lag Activation Counters:* Tracks the frequency of "Medium" and "Critical" lag events. Enhanced `/nlag status`:* Updated command output to include the new Average TPS and Activation statistics for better server monitoring.New Features
Water Mob Audit:* Verified and ensured thatMaintenance
WaterMobentities are correctly handled when thetargets.water-mobsconfiguration is enabled. Configuration Cleanup:* Optimized default configuration comments and structure for better usability. ---1.0.1NeuroLag 1.0.1Mar 7, 2026
This update focuses on internal optimization, modernizing the codebase for Paper 1.21.1, and fixing several logic gaps found in the initial release.Release 1.0.1 - Performance & Stability Update
Engine Optimization*: Switched from a global entity loop toImprovements & Optimization
world.getLivingEntities(), significantly reducing CPU usage on high-population servers. API Modernization*: Fully migrated to the modernAttribute.FOLLOW_RANGEAPI, ensuring long-term compatibility with Paper 1.21.1 and future versions. Smart Notification Cooldown*: Added a 5-second cooldown to Action Bar alerts to prevent message spam when server TPS fluctuates near trigger thresholds. Crash Resilience*: Implemented an automatic AI restoration sequence on plugin enable to ensure mobs are never stuck without AI due to improper server shutdowns.
Water Mobs Support*: Fixed a bug whereBug Fixes
water-mobsinconfig.ymlwere being ignored. The system now correctly optimizes aquatic entities. Tab-Completion*: Refined command suggestions to be more responsive and accurate. Logic Sync*: Fixed an issue where manual overrides could sometimes conflict with the automated monitoring task.
Core: Still powered by Java 21* for peak performance. Configuration*: No changes needed to your existingTechnical Note
config.yml, but we recommend checking ifwater-mobsis set to your preference. --- Optimizing the neural pathways of your server. Developed by Duong2012G.1.0.0NeuroLag 1.0.0Mar 7, 2026
We are excited to introduce the first official release of NeuroLag, a resource-aware neural optimization system designed specifically for modern Minecraft servers.Release 1.0.0 - Initial Neural Launch
Neural AI Scaling*: Implemented a dynamic performance monitoring system that scales Mob AI complexity based on real-time server TPS. Adaptive Pathfinding*: Integrated automatic adjustment of theNew Features
GENERIC_FOLLOW_RANGEattribute to reduce CPU overhead during lag spikes. Multi-Tier Logic: Three distinct optimization states: Normal (Full AI), Medium (Throttled Vision), and Critical* (AI Paused). Admin Dashboard*: Added a suite of commands (/nlag status,/nlag stats,/nlag toggle) for real-time monitoring and manual overrides. Notification System*: Real-time Action Bar alerts for administrators when the neural system changes states.
Core Engine: Built on Java 21* for maximum performance and modern standard compliance. API Compatibility: Optimized for Paper/Spigot 1.21.1*. Open Source: Released under the Apache License 2.0*.Technical Specifications
Simply drop theInstallation
NeuroLag-1.0.0.jarinto your plugins folder and restart your server. --- Developed with ❤️ by Duong2012G.
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
Chunky
Pre-generates chunks, quickly and efficiently
18.4MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
WorldEdit
A Minecraft Map Editor... that runs in-game! With selections, schematics, copy and paste, brushes, and scripting. Use it in creative, or use it temporarily in survival.
11.6MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta