NeuroLagСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачатьСкачать
ВЕРСИИ (19)
release
NeuroLag 1.8.0
1.8.02 июн. 2026 г.204Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [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.
release
NeuroLag 1.7.1
1.7.120 мая 2026 г.57Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [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.
### 🔴 Critical Fixes
#### Fixed — `LagEngine` — Safe Mode FOLLOW_RANGE silently overwritten every tick
- **Root cause:** After `SafeModeOptimizer.applySafeMode()` set `FOLLOW_RANGE = 4.0`,
the lambda in `applyAiBatched()` fell through to an unconditional
`attr.setBaseValue(attr.getDefaultValue() * multiplier)` at the bottom of the loop.
In CRITICAL state `multiplier = 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:** Added `continue` immediately after `safeModeOptimizer.applySafeMode(mob)` to
skip the unconditional `setBaseValue` line, 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 using `safe-mode: true` will see measurably lower entity
processing cost during lag spikes.
#### Fixed — `SafeModeOptimizer` — `NullPointerException` crash on certain entity types
- **Root cause:** `disableExpensiveAI()` and the previous `restoreAI()` called
`mob.getAttribute(FOLLOW_RANGE).setBaseValue(...)` without a null-check.
`getAttribute()` returns `null` for entity types that do not expose `FOLLOW_RANGE`
(e.g. Slime, Bat, some modded mobs), causing an unhandled `NullPointerException`
that bubbled up through the scheduler and printed a stack trace every tick.
- **Fix:** Extracted the result of `getAttribute()` into a local variable and guarded
both call sites with `if (attr != null)`.
#### Fixed — `SafeModeOptimizer` — `restoreAI()` used a hardcoded FOLLOW_RANGE table
- **Root cause:** The previous implementation maintained an internal `switch` table
mapping `EntityType → double` for 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 with `attr.getDefaultValue()`, which reads the
actual server-side default and therefore works correctly for all entity types including
custom ones.
### 🟡 Medium Fixes
#### Fixed — `LagEngine` — `applyDifficultyScaling()` had HARD and EASY inverted
- **Root cause:** `case HARD → tps + 1.0` raised the effective TPS, causing optimizations
to trigger *later* on Hard worlds. `case EASY → tps - 1.0` lowered 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:** `rateLimitCounters` and `rateLimitWindows` only cleared on `stop()`.
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 each `checkRateLimit()` call, entries whose 60-second window
has already expired are pruned via `removeIf`, and `rateLimitCounters` is kept in sync
via `retainAll`. Cost is amortised O(n) across all incoming requests — negligible
compared to the HTTP overhead of each call.
### 🛠️ Code Quality
#### Documented — `LagEngine` — `AIThrottler` field is intentionally unused
- The 1.7.0 refactor extracted `AIThrottler` as a separate class but did not update the
`applyAiBatched()` call site to delegate to it. The inline throttle logic continued to
run using `LagEngine`'s own `throttleCounters`, leaving `AIThrottler` as unreachable code
with its own duplicate counter map.
- This release adds an explicit `NOTE` comment 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.
---
release
NeuroLag 1.7.0
1.7.011 мая 2026 г.44Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.7.0] — 2026-05-01 — Major Architecture & Algorithm Improvements
### 🚀 Major Features
- **Safe Mode for Critical State**
- Added `safe-mode` configuration option under critical TPS tier
- Implemented `SafeModeOptimizer` to 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**
- Created `MobImportanceScorer` with 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**
- Implemented `MobBehaviorGroups` system 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
### 🧠 Algorithm Improvements
- **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 averages
### 🛠️ Configuration Management
- **Annotation-Based Validation**
- `@ConfigValidation` annotation for field-level validation rules
- `ConfigValidator` class 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
### 📚 Documentation
- **Comprehensive Config Guide**
- `CONFIG-GUIDE.md` with 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
### 🔧 Code Quality Improvements
- **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 appropriate
### 🎯 Performance Optimizations
- **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 approach
### 🔄 Backward Compatibility
- **Seamless Migration**
- Automatic config updates preserve existing functionality
- Graceful handling of missing or corrupt configuration files
- No breaking changes to existing setups
### 🐛 Bug Fixes
- **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
---
release
NeuroLag 1.6.0
1.6.029 апр. 2026 г.27Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
release
NeuroLag 1.5.2
1.5.223 апр. 2026 г.24Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11paper, purpur
Что нового
## [1.5.2] — 2026-04-23 — Bug Fix & Safety Patch
### Fixed — `plugin.yml`
- **Critical: wrong `api-version`** — `api-version` was set to `1.5.1` (the plugin version)
instead of the required Bukkit API version `1.21`. Paper rejects plugins with a non-standard
`api-version` string, causing the plugin to either fail to load or log a persistent warning
on every server start. Changed to `api-version: 1.21`.
### Fixed — `WebDashboard`
- **Token not generated when `monitors.yml` is deleted or web dashboard is disabled.**
`ensureStrongToken()` was only called after the `if (!webDashboardEnabled) return` guard,
meaning servers that had the dashboard disabled (or whose `monitors.yml` was deleted and
recreated by `saveResource`) 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 every `start()` call.
- If `monitors.yml` does not yet exist, `saveResource()` is called first to create the
file structure before the generated token is written into it.
### Fixed — `LagEngine` — Culling count wrong when protected zones are present
- **Protected-zone mobs were counted toward `targetRemoveCount` but never actually removed**,
causing the cull pass to under-remove and leaving entity counts above `maxEntities`
indefinitely on servers with active zone protection.
- `cull()` now pre-filters protected mobs from the candidate pool *before* computing
`targetRemoveCount`, 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 — `LagEngine` — AI update scheduler saturation on very mob-dense worlds
- **No upper bound on `runTaskLater` calls per tick** — on worlds with thousands of entities,
`applyAiBatched()` could schedule dozens of batch tasks in a single tick, queuing more
work than the scheduler could drain, leading to compounding latency.
- Added `AI_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 — `StressTestManager` — Server crash on large spawns at low-chunk-count locations
- **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 against `stress-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 in `systems.yml`: `stress-test.max-mobs-per-chunk: 80`.
### Fixed — `MultiServerSync` — MySQL reconnect attempt logged on every polling cycle
- When the MySQL database was down for an extended period, `ensureConnected()` 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
```yaml
# systems.yml — new in 1.5.2
stress-test:
max-mobs-per-chunk: 80 # NEW — per-chunk density safety cap for stress tests
```
---
release
NeuroLag 1.5.1
1.5.120 апр. 2026 г.20Minecraft: 1.5.1paper, purpur
Что нового
## [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.
- Zone `initialize()` now clears the WG cache on reload.
### Fixed / Improved — ProfileManager
- **Profile validation before apply** — switching to a profile where `critical-tps ≥ medium-tps`
or `max-entities < 1` now returns a clear error instead of silently corrupting the engine state.
- **Active profile persisted across restarts** — the selected profile name is written to
`plugins/NeuroLag/active-profile.dat` on switch and reloaded automatically on startup/reload,
so profiles survive server restarts without manual re-selection.
- `switchProfile()` return type changed from `boolean` to `String` (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 previous `split` /
`replaceAll` parser 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** — if `com.sun.management.OperatingSystemMXBean` is
unavailable (GraalVM, some container JVMs), the monitor now falls back to
`OperatingSystemMXBean.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 repeated `instanceof` checks 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 calling
`world.getPlayers()` a second time per mob check.
### Fixed / Improved — NeuroLagAPI
- Added `NeuroLagAPI.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-types` config 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: `lastTickMobCount` and `lastTickProcessingMs`.
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 covers `GET /` (the HTML dashboard page), not only `/api/*` endpoints.
- Token auto-generation log output upgraded to `SEVERE` level and formatted as a clearly
visible bordered block so admins cannot miss the new token in the console.
### Fixed / Improved — ConfigManager / ConfigValidator
- Added `stress-test.entity-types` list field.
- `ConfigValidator` now checks `entity-types` list is non-empty when stress test is enabled.
### Config changes (`systems.yml`)
```yaml
stress-test:
entity-types: # NEW — 1.5.1
- ZOMBIE
- SKELETON
- CREEPER
```
---
release
NeuroLag 1.5.0
1.5.019 апр. 2026 г.23Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11paper, purpur
Что нового
## [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 to `monitors.yml` and printed to the console.
- Added per-IP rate limiting (sliding 60-second window, configurable via
`web-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/status` and `/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 to `stress-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 configurable `stress-test.cooldown-seconds` (default 300) must elapse between
tests. Attempting to start a test during cooldown shows the remaining time.
- Both limits are enforced by `ConfigValidator`.
- **[Bug #3] Redis subscriber join(3000) always timed out on slow networks**
(`MultiServerSync.java`)
- `stop()` now holds a `volatile` reference to the active `JedisPubSub` instance and calls
`pubSub.unsubscribe()` *before* `interrupt()+join()`. This signals the blocking
`jedis.subscribe()` call to return immediately, so `join()` completes in milliseconds
rather than timing out. Prevents connection-pool leaks during rapid `/nlag reload` cycles.
- **[Bug #4] Smart culling could remove hundreds of entities in one pass → lag spike**
(`LagEngine.java`)
- Added `CULL_PER_TICK_CAP = 50` — at most 50 entities are removed per cull invocation.
If the entity count remains above `max-entities-per-world` after 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 to `plugins/NeuroLag/predictive-data.json` on
`stop()` (server shutdown or `/nlag reload`) and reloaded on `start()`. 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 reload` that only changes TPS thresholds, zero external services
are bounced, eliminating the stutter caused by restarting Redis/MySQL connections
unnecessarily.
### Changed
- `ConfigValidator` now validates the new stress-test limits and rate-limit settings.
- `systems.yml` — added `stress-test.max-mob-count` and `stress-test.cooldown-seconds`.
- `monitors.yml` — added `web-dashboard.rate-limit` and `web-dashboard.ip-whitelist` sections.
---
release
NeuroLag 1.4.1
1.4.118 апр. 2026 г.15Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11paper, purpur
Что нового
## [1.4.1] — 2026-04-18 — Bug Fix Release
### Fixed — Critical
- **Task leak on reload (`/nlag reload`)** — `BackupManager.start()` was called twice in
`onEnable()` (once directly, once via `startRuntimeServices()`), 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 inside `start()` when no backups exist.
`stopRuntimeServices()` now also calls `engine.cancelAllPendingBatchTasks()` before
stopping the throttle task, ensuring all in-flight `runTaskLater` batch tasks are cancelled
before any new tasks are registered. (`LagEngine`, `NeuroLag`)
- **`collectTargets()` running every tick on the main thread** — `LagEngine.collectTargets()`
called `world.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 on `restoreAll()` and on world
state transitions. (`LagEngine`)
- **FOLLOW_RANGE not fully restored for protected-zone mobs** — `applyAiBatched()` set
`AI = true` for protected mobs but did not always restore `FOLLOW_RANGE` to its default
value, so mobs could permanently retain a reduced follow range after leaving a zone.
The fix unconditionally calls `attr.setBaseValue(attr.getDefaultValue())` for every
protected mob encountered. Additionally, a new `restoreWorld(World)` helper is called
whenever a world transitions back to `NORMAL`, 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-flight
`runTaskLater` batch tasks scheduled by `applyAiBatched()` could execute *after*
`restoreAll()` and re-apply AI restrictions or reduced follow ranges, leaving mobs
frozen. `handleToggle()` now calls `engine.cancelAllPendingBatchTasks()` before
`engine.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 key
`web-dashboard.auth.allow-query-token` (default `false`) must be explicitly set to `true`
to 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()` called
`redisSubThread.interrupt()` but returned immediately, so the thread could still be holding
a Jedis resource when `jedisPool.close()` ran, causing pool-exhaustion exceptions in the
server log on every reload. The fix adds `redisSubThread.join(3000)` after `interrupt()`,
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()` called
`DriverManager.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 checked
`zoneManager.isProtected()` only in the main optimization path, not inside `cull()` 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 `.yml` files. Custom language files stored in `plugins/NeuroLag/lang/` would
be lost on restore. `collectConfigFiles()` now recursively includes `lang/*.yml` entries
and `restoreZip()` correctly recreates the `lang/` subdirectory on restore. (`BackupManager`)
---
release
NeuroLag 1.4.0
1.4.014 апр. 2026 г.21Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.4.0] — Stability + lifecycle fix release
### Fixed
- Removed the command-level permission wall in `plugin.yml` so feature-specific permissions can actually work.
- Reworked `/nlag toggle` so manual override now restores mobs immediately and stops active throttling instead of leaving old optimization state hanging.
- Reworked `/nlag reload` to 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 have `FOLLOW_RANGE` restored to defaults when encountered during optimization.
- Ongoing `MEDIUM` and `CRITICAL` states 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 copying `config.yml`.
- Added restore-by-name support for `/nlag backup restore <file>`.
- Memory-pressure config now normalizes legacy percentage values above `1.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 respects `dashboard.bossbar.name` and `dashboard.bossbar.color` from `monitors.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 for `web-dashboard`, `multi-server`, `zone-protection`, `config-profiles`, and backup restore.
- Updated language file version headers to `v1.4.0`.
release
NeuroLag 1.3.1
1.3.112 апр. 2026 г.18Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.3.1] — Bug Fix Release
### 🐛 Fixed
- **[CRITICAL] FOLLOW_RANGE stuck at 0 after mob returns near player**
Mobs whose `FOLLOW_RANGE` was 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: restore `FOLLOW_RANGE` to `defaultValue × multiplier` inside the
`nearPlayer || hotRegion` branch of `applyAiBatched()`.
- **[CRITICAL] ConcurrentModificationException on `tpsHistory` between main thread and HTTP thread**
`tpsHistory` was an `ArrayDeque` — not thread-safe. The Bukkit main thread
writes to it every tick while the Web Dashboard HTTP thread pool iterates
it on every `/api/status` request, causing intermittent exceptions.
Fix: replaced with `ConcurrentLinkedDeque`. Added `volatile` to `tpsSum`,
`tpsCount`, `criticalActivations`, and `mediumActivations` for JMM visibility.
- **[CRITICAL] MySQL connection silently dies after DB restart or idle timeout**
A single `Connection` was reused indefinitely. When MySQL restarted or timed
out, all subsequent sync calls threw `SQLException` silently, leaving
multi-server sync permanently broken with no visible warning.
Fix: added `ensureConnected()` that checks `isClosed()` and reconnects
automatically before each `upsertMysql()` / `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 deferred `finish()` in the same tick as an
early `stop()` call, both executions would complete and emit an audit report.
Fix: `finish()` returns immediately if `running` is already `false`.
- **[MEDIUM] Web API /api/cmd whitelist bypassable via prefix matching**
`body.startsWith(a)` allowed inputs like `"reloadEvil"` to pass the filter.
Fix: the first token is extracted and matched exactly against the allowlist.
### 🔒 Security
- **Web auth token warned when passed via URL query param**
`?token=xxx` leaks into browser history and proxy logs. `Authorization: Bearer`
header is now the primary path; query-param auth logs a one-time warning.
### ⚡ Performance
- **Redis publisher now uses JedisPool**
A fresh TCP connection was opened and closed every 5 seconds. A bounded
`JedisPool` (max 8 / idle 2) is created at startup and shared by publisher
and subscriber, eliminating per-publish connection overhead.
---
release
NeuroLag 1.3.0
1.3.015 мар. 2026 г.145Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.3.0] — 2026-03-15
### 🐛 Bug Fixes (9 fixes)
#### BUG-A — ZoneManager: world name dropped from cuboid zones (cross-world contamination)
- **Root cause:** `ZoneManager.initialize()` parsed zone entries as `"world x1 y1 z1 x2 y2 z2"` (7 parts) but stored only `parts[1]..parts[6]` in a raw `double[]`, silently discarding `parts[0]` (the world name).
- **Effect:** A zone defined in world `survival` would also protect mobs at the same coordinates in `world_nether`, `world_the_end`, and any other loaded world. Mobs in unintended worlds were immune to optimization.
- **Fix:** Replaced `List<double[]>` with `List<CuboidZone>` where `CuboidZone` is a Java `record` holding `String world` + 6 coordinates. `isProtected()` now checks `mob.getWorld().getName().equals(z.world())` before testing coordinates.
#### BUG-B — RegionOptimizer: negative chunk coordinates mapped to wrong region
- **Root cause:** Region index was computed as `chunkX / regionSize` using Java integer division, which truncates toward zero. Chunk `-1 / 16 = 0` and chunk `1 / 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 `/` with `Math.floorDiv()` in both `refresh()` and `isHot()`. `Math.floorDiv(-1, 16) = -1` (correct), `Math.floorDiv(15, 16) = 0` (correct).
#### BUG-C — DashboardManager: `type: HOLOGRAM` silently did nothing
- **Root cause:** `DashboardManager.start()` returned early with `if (!dashboardType.equals("BOSSBAR")) return` — no log message, no error. Admins who set `dashboard.type: HOLOGRAM` saw no dashboard and received no indication why.
- **Fix:** Added an explicit `plugin.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 used `Files.readAttributes(...).creationTime()` to sort backups oldest-first. The ext4 filesystem does not store inode creation time — it returns `Instant.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:** Replaced `creationTime()` with `Files.getLastModifiedTime()`, which is reliably stored on all filesystems. Also removed the now-unused `BasicFileAttributes` import.
#### BUG-E — StressTestManager: always spawned at `world[0]` spawn, ignoring admin's location
- **Root cause:** `start()` hardcoded `Bukkit.getWorlds().get(0).getSpawnLocation()` as the spawn center regardless of where the admin was or which world they were in.
- **Effect:** Running `/nlag stresstest` from the Nether or End spawned mobs in the Overworld at spawn, making the test meaningless for other worlds.
- **Fix:** `start()` now accepts a `CommandSender` parameter. If the sender is a `Player`, mobs spawn centered on the player's current location in their current world. Console fallback remains `world[0]` spawn.
#### BUG-F — WebDashboard: POST `/api/cmd` blocked by CORS preflight (OPTIONS)
- **Root cause:** Browsers send an HTTP `OPTIONS` preflight request before a cross-origin `POST`. The server had no handler for `OPTIONS` and returned `405 Method Not Allowed`, causing the browser to abort the actual `POST`.
- **Effect:** The "send command" button in external web dashboards or REST clients always failed silently.
- **Fix:** Added `sendCorsOptions()` helper that returns `204 No Content` with `Access-Control-Allow-Methods: GET, POST, OPTIONS` and `Access-Control-Allow-Headers: Authorization, Content-Type`. Both `/api/status` and `/api/cmd` now handle `OPTIONS` before 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 full `cfg.reload()` to restore values
- **Root cause:** `switchProfile()` overwrote `cfg.tpsCritical`, `cfg.tpsMedium`, and `cfg.maxEntities` directly. `clearProfile()` only set `activeProfile = null` and left a comment saying "caller is responsible for reloading", which `NeuroLag.java` implemented by calling `cfg.reload() + engine.restoreAll() + startMonitor()` — a heavy operation that re-read disk and restarted all tasks.
- **Fix:** `ProfileManager` now saves the three base values in `saveBaseValues()` (called in the constructor and after every `cfg.reload()`). `clearProfile()` restores them directly — no reload required. `/nlag profile clear` no 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 called `mob.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.stresstest` description now mentions mobs spawn at your location
- `pom.xml`: version bumped to 1.3.0
- `StressTestManager.start()` signature changed to `start(int count, int durationMinutes, CommandSender sender)` — callers updated in `NeuroLag.java`
- `ProfileManager.saveBaseValues()` is now public so `NeuroLag.java` can call it after `/nlag reload`
---
release
NeuroLag 1.2.0
1.2.014 мар. 2026 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.2.0] — 2026-03-14
### 🎉 All 18 Advertised Features — Now Fully Implemented
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 |
|---|---|
| `CpuMonitor.java` | F1 — CPU throttling via `com.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 (JDK `HttpServer`), 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 channel `neurolag: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.enabled` and `dashboard.update-interval` added
- `audit-reports.generate-on-critical` added
- `multi-server.mysql.*` section added
- `zone-protection.zones` list added
- `config-profiles.profiles.*.medium-tps` key added
- `alerts.enabled` top-level flag added
- `stress-test.auto-generate-report` added
#### 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`
---
release
NeuroLag 1.1.0
1.1.014 мар. 2026 г.19Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.1.0] — 2026-03-14
### 🎉 Major Release: 18 New Advanced Features!
### ✨ Added
#### 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: `cpu-throttling.enabled` and `cpu-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.enabled` and `region-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.*` and `mob-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.enabled` and `animation-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.enabled` and `metrics-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.enabled` and `audit-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.enabled` and `ai-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.enabled` and `zone-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.enabled` and `config-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 validate` checks 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
### 🌍 Multilingual Support (Added)
- **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 in `config.yml`: `settings.language: EN`
### 📝 Documentation
- Completely rewritten README with all 18 features documented
- Multilingual documentation in README (7 languages)
- Comprehensive CHANGELOG (this file)
- Detailed config.yml with all features documented
### 🔧 Command Enhancements
New commands added:
- `/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
### 🔐 Permission Enhancements
New permissions added:
- `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
### 📊 Configuration Changes
- 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)
### 🎯 Performance Improvements
- CPU throttling reduces unnecessary task execution
- Region-based optimization replaces global optimization
- Smart culling reduces entity processing
- Predictive prevention prevents lag spikes before they happen
### 🐛 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
### 📈 Version Info
- **Version:** 1.1.0
- **Target:** Paper 1.21+, Java 21+
- **Release Date:** 2026-03-14
- **Total Features:** 18 (from 16 in v1.0.6)
- **Supported Languages:** 7
- **New Files:** None (all backwards compatible)
---
release
NeuroLag 1.0.6
1.0.610 мар. 2026 г.26Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [1.0.6] — 2025-03-11
### Fixed
- **Bug — Tick-Rate Throttling (Feature 2) never activated**
In `applyAiBatched`, `shouldHaveAi` was always `true` for MEDIUM state because
`globalAiOn = !state.equals("CRITICAL")` evaluates to `true`. The throttle
condition `!shouldHaveAi` was therefore always `false`, 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
get `setAI(false)` as intended.
- **Bug — `/nlag toggle` did not actually pause monitoring**
Setting `manualOverride = true` had no effect on `tick()` — 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 to `Double.parseDouble()`, crashing with an unhandled exception.
Fix: an explicit `equalsIgnoreCase("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 reload` and plugin restarts,
causing the first post-reload notification to be silently dropped.
Fix: `notifyTimes.clear()` added to `restoreAll()`.
---
## [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 by `chunk-ai.enabled` and `chunk-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 by `tick-throttle.enabled` and `tick-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 by `spawn-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 by `per-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 simulate` with no argument clears the override.
- **Feature 6 — Auto Lag Reports**
After recovering from a CRITICAL event that lasted longer than `min-duration-seconds`,
a timestamped report is written to `plugins/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**
Specific `EntityType` names can be added to `targets.whitelist-types` to permanently
exempt them from all optimization and culling. Additionally, `protect-named-mobs`
and `protect-tamed-mobs` options 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 by `discord.*`.
- **Feature 9 — Memory Pressure Detection**
Reads JVM heap usage ratio at each TPS check. When heap exceeds `trigger-percent`,
an additional offset is subtracted from effective TPS before threshold evaluation,
causing NeuroLag to act more aggressively when RAM is nearly exhausted.
Controlled by `memory-pressure.*`.
- **Feature 10 — Player-Count Scaling**
TPS thresholds are linearly scaled upward as the number of online players increases
between `min-players` and `max-players`. At maximum players, all thresholds shift up
by `max-threshold-offset` TPS. Per-world threshold overrides are scaled the same way.
Controlled by `player-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.
release
NeuroLag 1.0.4
1.0.410 мар. 2026 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
## [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>` was `1.0.0` while `plugin.yml` declared `1.0.3`, causing Maven to produce `NeuroLag-1.0.0.jar` instead of the expected filename.
- **Hysteresis buffer is now configurable.** The recovery buffer (`0.5`) was hardcoded in `computeStatus()`. It is now read from `settings.hysteresis-buffer` in `config.yml`.
- **`/nlag graph` was undocumented.** Added to `plugin.yml` usage string and to the help message shown by `/nlag`.
- **`shouldOptimize` explicit cast removed.** The `(Mob) entity` cast after `instanceof Mob` check was unnecessary; replaced with pattern-matching `instanceof Mob mob` at 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.yml` comments rewritten in English and expanded with usage notes for each option.
- `plugin.yml` usage string updated to list all four subcommands: `reload`, `status`, `toggle`, `graph`.
- `computeStatus` refactored to use `switch` expression (Java 14+) for readability.
- `drawGraph` improved: empty cells now render as `░` instead of a space, making the chart easier to read in chat.
- `status` command now displays per-world states with a `(no data yet)` fallback when the monitor hasn't run yet.
- Added `README.md` and `CHANGELOG.md`.
---
release
NeuroLag 1.0.3
1.0.37 мар. 2026 г.15Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
fixed
release
NeuroLag 1.0.2
1.0.27 мар. 2026 г.14Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
# 🛠️ Changelog - NeuroLag v1.0.2
All notable changes to the **NeuroLag** plugin in this version are documented below.
---
## [1.0.2] — 2026-03-07
### 🚀 Performance Optimizations
* **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.
### 🛡️ Stability Improvements
* **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.
### 📊 New Features
* **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.
### 🛠️ Maintenance
* **Water Mob Audit:** Verified and ensured that `WaterMob` entities are correctly handled when the `targets.water-mobs` configuration is enabled.
* **Configuration Cleanup:** Optimized default configuration comments and structure for better usability.
---
release
NeuroLag 1.0.1
1.0.17 мар. 2026 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
# 🚀 Release 1.0.1 - Performance & Stability Update
This update focuses on internal optimization, modernizing the codebase for Paper 1.21.1, and fixing several logic gaps found in the initial release.
### 🛠 Improvements & Optimization
* **Engine Optimization**: Switched from a global entity loop to `world.getLivingEntities()`, significantly reducing CPU usage on high-population servers.
* **API Modernization**: Fully migrated to the modern `Attribute.FOLLOW_RANGE` API, 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.
### 🐞 Bug Fixes
* **Water Mobs Support**: Fixed a bug where `water-mobs` in `config.yml` were 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.
### 📦 Technical Note
* **Core**: Still powered by **Java 21** for peak performance.
* **Configuration**: No changes needed to your existing `config.yml`, but we recommend checking if `water-mobs` is set to your preference.
---
*Optimizing the neural pathways of your server.* Developed by **Duong2012G**.
release
NeuroLag 1.0.0
1.0.07 мар. 2026 г.29Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11bukkit, paper, purpur, spigot
Что нового
# 🚀 Release 1.0.0 - Initial Neural Launch
We are excited to introduce the first official release of **NeuroLag**, a resource-aware neural optimization system designed specifically for modern Minecraft servers.
### 🌟 New Features
* **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 the `GENERIC_FOLLOW_RANGE` attribute 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.
### 🛠 Technical Specifications
* **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**.
### 📦 Installation
Simply drop the `NeuroLag-1.0.0.jar` into your plugins folder and restart your server.
---
*Developed with ❤️ by Duong2012G*.