HomeJavaModsLagWarden [1.16.5 - 26.2] — lag machine detector with one-command throttling
LagWarden [1.16.5 - 26.2] — lag machine detector with one-command throttling
ModsJava

LagWarden [1.16.5 - 26.2] — lag machine detector with one-command throttling

One jar for 1.16.5 – 26.2, Spigot and Paper. Finds the lag machine, names the type, chunk, block and

⬇ Download on Spigot
LagWarden
Find the lag machine, name the builder, slow it down — without breaking anything

One jar: Minecraft 1.16.5 — 26.2, Spigot and Paper.
No NMS, no dependencies, no separate builds per version.​


The short version

/tps tells you the server is struggling. It does not tell you where or why.

LagWarden answers that: the type of the mechanism, the world, the chunk, the block coordinates, the event
rate per second, how long it has been running, and the likely builder with an explicit confidence level.

Then you deal with it in one command:

Code (Text):
/lag throttle 1
The mechanism now runs 8x slower. No blocks were broken, no entities were deleted, the build is intact.
Two minutes later the restriction lifts itself.


The detector

Six types, no cut-down version:


Every finding reports the type, world, chunk, block coordinates, rate per second, duration and the likely
builder. A dual threshold (burst + sustained) plus hysteresis keeps it away from legitimate farms.
Message anti-spam is configurable.

Spoiler: What a detection looks like
Code (Text):

[LagWarden] Lag machine found: REDSTONE CLOCK
  World: world   Chunk: 12/-40   Block: 205/64/-633
  Rate: 380 per second, sustained for 74 s
  Likely builder: Steve (exact, from the placement log)
  Action: report only
  Suppress manually: /lag throttle 1
 
After your command:

Code (Text):

[LagWarden] Slowdown applied: REDSTONE CLOCK (world 12/-40) — throttle x8 for 120 s
 

[HR][/HR]

Throttling instead of destruction

Every ticking mechanism produces a stream of events. Suppress a fraction of those events and the mechanism
keeps existing but runs 2x, 4x, 8x or 16x slower.

Command What it does
/lag throttle <number> Slow down a detected machine by its number from the findings list or from /lag chunks
/lag throttle chunk [level] [seconds] Slow down the chunk you are standing in
/lag throttle <cx> <cz> [world] [level] [seconds] Slow down an arbitrary chunk by coordinates
/lag unthrottle <number|all> Remove the slowdown
/lag throttles What is currently throttled and how much time is left



[HR][/HR]

Everything else


Spoiler: What /lag and /lag chunks look like
Code (Text):

=== LagWarden ===
TPS: 19.8 (10s) / 19.9 (1m) / 20.0 (5m)
MSPT: 24.1 ms (source: Paper)
Memory: 3204 / 6144 MB (52%)
Loaded chunks: 1024   Entities: 3187
Load profile: NORMAL
Uptime: 4h 12m

=== Problem chunks (world) ===
 #1  12/-40   score 980   entities 412 (350 of them items)   [/lag tp 1]
 #2  -3/17    score 640   redstone 240/s, hoppers 90/s
 #3  88/104   score 310   mob spawns 40/s (spawner)
 

[HR][/HR]

How this differs from other free anti-lag plugins

Typical anti-lag plugin LagWarden
Ranks chunks by entity count Composite load score: entities, hoppers, redstone rate, spawn rate, explosives — with the reason printed
Says "this chunk has a lot of entities" Says "redstone clock, 380 per second, sustained 74 s, block 205/64/-633"
Has no idea who built it Keeps a placement log and names a likely builder with a confidence level
Single threshold, so it fires at a 30-hopper sorter Dual threshold: it needs both a burst and 30–60 seconds of sustained excess, with a dip allowance
Fixes lag by deleting entities and wiping builds Throttling: the mechanism slows down and stays intact. The plugin never breaks blocks and never deletes player entities
Acts silently and cannot be undone Every action is announced with numbers and is reverted by a timer, by /lag unthrottle or by /lag reload
Often subscribes to BlockPhysicsEvent and becomes a lag source itself BlockPhysicsEvent is never used. That is an architectural rule, not a config option


Why the dual threshold matters. A legitimate farm either runs in bursts or runs steadily but an order
of magnitude slower than a lag machine. Defaults are deliberately high: 40 redstone triggers per second
on a single block, while the fastest legal repeater clock is around 5/s; 150 hopper transfers per
second per chunk, while one hopper tops out at 2.5/s — that is roughly 60 hoppers running non-stop in one
chunk. The rule is: better to miss a weak lag machine than to touch someone's farm.

[HR][/HR]

The plugin does not lag your server

Code (Text):

=== LagWarden: own overhead ===
Average: 0.34 ms/tick (0.7% of the tick budget)
Peak over 5 min: 2.1 ms
Events processed: 1.2M (redstone 940k, hoppers 210k, ...)
Tracked chunks: 812 / 10000   blocks: 1930 / 20000
Scanner: 8 chunks/tick, last full pass 46 s ago
 

[HR][/HR]

Item cleaner safety

All of these are on by default:


The cleaner only touches dropped items lying on the ground. Chests, inventories, item frames and armor
stands are not affected at all.

[HR][/HR]

Installation

  1. Download LagWarden.jar from this page.
  2. Drop it into your plugins folder.
  3. Restart the server (do not use /reload).
  4. Open plugins/LagWarden/config.yml, set language and disabled-worlds if needed.
  5. Run /lag, then /lag chunks, then /lag inspect 1.

No dependencies. Java 8 or newer. Works on Spigot, Paper and their forks (Purpur, Pufferfish, Leaf).

Commands

Command Permission Description
/lag lagwarden.use Status: TPS, MSPT, memory, chunks, entities, profile
/lag help lagwarden.use Command list
/lag chunks [world] [page] lagwarden.chunks Problem chunk ranking with score and reason
/lag entities [world|chunk] [all] lagwarden.entities Entity breakdown by type
/lag tp <number> lagwarden.tp Teleport to a chunk from the last listing
/lag inspect <number|cx cz [world]> lagwarden.inspect Chunk card: counters, entities, hoppers, placement log, throttles
/lag scan lagwarden.scan Immediate full scanner pass
/lag clear [world] [confirm] lagwarden.clear Immediate ground item cleanup
/lag throttle <number|chunk|cx cz [world]> [level] [sec] lagwarden.throttle Slow down a detected machine or a chunk
/lag unthrottle <number|all> lagwarden.throttle Remove a slowdown
/lag throttles lagwarden.throttle Active slowdowns with remaining time
/lag self lagwarden.self The plugin's own overhead
/lag reload lagwarden.reload Reload configuration and lift all restrictions


Permissions

Permission Default Description
lagwarden.use op Base /lag command
lagwarden.chunks op /lag chunks
lagwarden.entities op /lag entities
lagwarden.tp op /lag tp
lagwarden.inspect op /lag inspect
lagwarden.scan op /lag scan
lagwarden.throttle op /lag throttle, /lag unthrottle, /lag throttles
lagwarden.clear op Manual item cleanup
lagwarden.self op /lag self
lagwarden.reload op Reload configuration
lagwarden.notify op Receive low TPS and detector messages in chat
lagwarden.bypass.limits false Entity limits do not apply to this player
lagwarden.bypass.cleaner false This player's items are never cleaned up
lagwarden.admin op All of the above


[HR][/HR]

What this plugin does NOT do


[HR][/HR]

FAQ

Spoiler: Will the plugin itself cause lag?
Run /lag self and check. The plugin caps itself at 1% of the tick budget and throttles its own scanner
if it goes over. Hot event handlers allocate nothing, BlockPhysicsEvent is never used, and the chunk scanner
runs on a hard budget of 8 chunks and 2 ms per pass.

Spoiler: Will it delete my builds or farms?
No. Block breaking does not exist as an operation in this plugin. Throttling only slows a mechanism down:
the blocks stay, the items inside the hoppers stay, and after 120 seconds everything returns to normal by
itself. Entities are never deleted either — the chunk limit works in blocking mode, so new entities simply
do not spawn. Only dropped items on the ground are removed, and only according to the keep list.

Spoiler: Will it complain about my legitimate iron farm?
A detection requires both an instantaneous burst and 30–60 seconds of sustained excess. Iron farms,
20–40 hopper sorters, mob stackers and observer-based farms do not meet both conditions. Natural spawning is
never counted as a violation, and item drops from a player actively mining are not blocked. All thresholds
are configurable, and even when the detector fires it only prints a report — whether to throttle anything is
your decision.

Spoiler: Does anything happen automatically?
No. That is deliberate. The detector reports, the cleaner runs on the schedule you configured, and the chunk
limit blocks spawns above the number you set. Nothing else happens without an explicit command from you.

Spoiler: Does it work on plain Spigot?
Yes. It is compiled against the Spigot API 1.16.5 and does not call Paper-only methods directly; TPS comes
from its own tick counter, which works on any server software. The only difference is MSPT: exact on Paper,
an explicitly labelled estimate on Spigot.

Spoiler: Does it work on Folia?
No. The plugin is intentionally not marked as folia-supported, so Folia refuses to load it and your server
stays intact. Folia support is planned for a later release.

Spoiler: Does it really work on 1.16.5?
Yes, the same jar. Java 8 bytecode, api-version 1.16, no NMS. Verified by actually starting it on 1.16.5,
1.20.1, 1.21.11 and 26.2.

Spoiler: Any dependencies?
None. No Vault, no ProtocolLib, no libraries to install.

Spoiler: How do I update to a newer release of the plugin?
Replace the jar and restart. The config file is updated in place: new keys are added, your values are never
overwritten, and messages files keep your edits.

Spoiler: What about updates?
Planned next: a config GUI, a separate region-integration add-on, then Folia support. No dates promised, but
the order is fixed.

Spoiler: How do I undo everything?
/lag reload lifts every restriction the plugin applied, including all active throttles. Disabling the
plugin does the same. For a single case, /lag unthrottle all. Every feature can also be switched off
with a single enabled flag in its config section — and then its listener is not even registered.

Spoiler: I already run another anti-lag plugin
On startup LagWarden detects known anti-lag plugins and prints one informational line suggesting you keep
item cleanup in only one of them. It never disables anything else. Counting listeners run at MONITOR with
ignoreCancelled, suppressing listeners at HIGH, so protection plugins and anticheats always act first.

Spoiler: My server has hopper.disable-move-event enabled in paper.yml
Then the server never fires InventoryMoveItemEvent and the hopper detector is blind. The plugin notices this
and prints a hint in the console. All other detectors keep working.


Support and feedback

LagWarden [1.16.5 - 26.2] — lag machine detector with one-command throttling is a free Minecraft Java mod. Compatible with Minecraft 1.16, 1.17, 1.18, 1.19 and newer. Downloaded 3 times (via Spigot). Download it and open it directly in the game.

Explore more