
Placeholder
| Placeholder | Function | Explanation |
|---|---|---|
| %clearlag_nextclear% | Next Clear Time | Displays the time remaining until the next scheduled automatic entity clear. The output is formatted in a readable format, such as 5m 30s (5 minutes and 30 seconds) |
| %clearlag_nextclear_seconds% | Extension for nextclear | Displays the time remaining until the next scheduled automatic entity clear. Only in Seconds will be Displayed |
| %clearlag_autoclear_enabled% | Show If AutoClear Is On/Off | Show If AutoClear Is On/Off |
| %clearlag_autoclear_interval% | Shows the Time of Auto Clear | Displays the time set for auto clear |
| %clearlag_lastclear_items% | Shows Stats for last Auto Clear | Shows how many items were removed during auto clear. |
| %clearlag_lastclear_entities% | Shows only entitys for last Auto Clear | The exact number of entities removed during the last auto-clear (excluding items) |
| %clearlag_lastclear_total% | Shows what was deleted in the last clear | The total number of all removed entities (items + other) during the last clear |
| %clearlag_stats% | Last Clear Statistics | Shows the number of entities that were removed during the most recent automated or manual clear action. Example output: 150 entities have been removed |
| %clearlag_entity_total% | Total Entity Count (Server) | Provides the absolute count of all entities currently loaded across all worlds on the server. |
| %clearlag_entityworld |
Entity Count (Per World) | Displays the number of entities in a specific world defined by replacing |
| %clearlag_dropped_items_total% | Total Dropped Item Count | The total number of dropped item entities currently lying on the ground across all worlds |
| %clearlag_ram% | RAM Usage | Reports the server's current Java Virtual Machine (JVM) memory usage. It typically shows the used memory versus the total allocated memory in megabytes (MB). Example output: 1024.55 MB / 2048 MB |
| %clearlag_mobs_total% | Total Entity Count (Mobs) | The total number of all living mobs (animals and monsters, excluding players, items, etc.) |
| %clearlag_loaded_chunks% | Total Chunks Loaded Chunks | The total number of all loaded chunks on the server |
| %clearlag_chunkunload_threshold% | Shows how many mobs have been set until the chunk is unloaded | Displays the set entity threshold for automatic chunk unloading. |
| %clearlag_lastunload_chunks% | Displays the total number of Chunks discharged during the automatic discharge scan | The total number of all Chunks That got unloaded while the auto unload scan |
English
ClearLag++:
The ClearLag++ plugin for Minecraft servers is a powerful tool for increasing server performance and comprehensively combating lag. It offers a variety of intelligent features to ensure smooth and stable operation.
Intelligent Entity Management
Automatic Cleanup:
Automatically removes dropped items and entities after a configurable time, with a visible countdown.
- Comprehensive Protection: Excludes named mobs, farmed mobs, and mobs with a scoreboard tag from being cleaned up.
- After-Death & Recent-Activity Protection: Protects death drops and items dropped near players for a configurable duration.
- Smart Stacking: Merges items beyond the normal 64 limit and groups non-stackable items (like potions) to keep entity counts low.
- Clean-up Effects: Adds configurable particles and sounds when entities are cleared to make the process feel seamless.
Targeted Removal:
Administrators can selectively remove hostile, passive, or all mobs using /clearlag killmobs or /clearlag nuke.
Advanced Performance Optimizations
Redstone & Physics Optimization:
Limits the update rate of redstone components and prevents lag from mass falling-block events (sand/gravel) or piston-heavy contraptions.
Entity & Tile Entity Limiter:
Sets strict limits for Item Frames, Armor Stands, Vehicles, Projectiles, and Tile Entities (Hoppers, Chests, Spawners) per chunk and globally.
Mob Spawn & Breeding Limiter:
Controls the natural spawn rate and prevents breeding lag by limiting the number of animals per chunk.
AI Optimization (Distance-Based Despawn):
Removes mobs that are further from every player than a configurable distance, eliminating the AI and pathfinding cost they cause. Note: this despawns the mob itself, it does not merely switch its AI off. Named, bred, tagged, tamed and leashed mobs are excluded by default, and any mob the game itself never despawns is always kept.
Environmental & Connection Control:
Throttles fire spread, liquid flow, and portal usage. Includes a Packet Rate Limiter (ProtocolLib) to stop network-based lag.
Monitoring, Diagnostics, and Dynamic Control
Performance Metrics & Monitoring:
Provides real-time statistics on TPS, MSPT, CPU utilization, and RAM usage. Includes a BossBar Performance Meter for live monitoring.
Dynamic View Distance:
Automatically scales server-wide view distance and simulation distance based on real-time TPS and player activity.
Performance Alerts & Snapshots:
Notifies administrators and automatically saves Lag Snapshots (detailed reports) when performance spikes or falls below thresholds.
Diagnostic Tools:
The Chunk Scanner identifies chunks with high entity counts, while the Lag Profiler highlights performance bottlenecks. With debug mode enabled, every single entity the plugin removes is written to the console together with the feature responsible — so if something disappears and no removal line appears for it, you know immediately that ClearLag was not the cause.
Multi-World & Time Support:
Features Per-World Profiles and Time-Based Rules allowing for unique settings during day, night, or event modes.
Per-Region Rules (WorldGuard):
Mark individual regions as clear-immune so entities inside them survive every clear, and override the hostile and passive mob limits per region â ideal for marketplaces, arenas and event areas.
Comprehensive Integration:
Full native support for LuckPerms, Discord webhooks, PlaceholderAPI, WorldGuard and ProtocolLib, plus third-party plugins like MythicMobs, EliteMobs, Nexo, Oraxen, ItemsAdder, LevelledMobs, Citizens, the major hologram and NPC plugins, and every common mob stacker.
LuckPerms
All permissions/commands can be managed via LuckPerms
See my other Projects Modrinth
This Plugin is currently in Beta
ClearLag Plugin
Copyright (c) [fernsehheft] [2026]
All Rights Reserved.
This software is proprietary and may not be redistributed, modified, or used for commercial purposes without the express written permission of the copyright holder.
SUPPORT
If something doesn't work, you can let me know on Discord or on my SpigotMC Page
Plugins Used:
- InstantLeafDecay by Mobilestars\ (With an extra License)
- WildStacker
- Ultimate-Stacker
- RoseStacker
- LevelledMobs
- Nexo
- Oraxen
- MythicMobs
- EliteMobs
- Citizens
- FancyNpcs
- FancyHolograms
- Shopkeepers
- DecentHolograms
- ItemsAdder
- WorldGuard
- ProtocolLib
Downloads:
If you have any suggestions for improvement or new ideas, please let me know on my dc
BStats
Sponsor:
Use Code pluginhub for 10% on both EPYC and Ryzen servers
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 | ||||
| 18h ago | 1 |
### Added:
- Nothing ):
### Fixed:
- Armor stands no longer disappear when placed.** Sometimes placing an armor stand took the item from the player but placed nothing. The mob spawn limiter counted armor stands as mobs and blocked them once an area was full, and it could even remove armor stands that were already standing. Armor stands are now completely ignored by the mob spawn limiter.
- The armor stand / item frame limiter no longer eats items.** When the limit is reached, the placement is blocked and the player keeps the item. Players with
clearlag.bypass.limitcan always place them. - The armor stand / item frame limiter now stays off when it is not in your config.** Older configs without this section had the limiter running silently (10 per chunk, 100 per world). It is now off unless you turn it on, like in the default config.
### Removed:
- Nothing (:
### Added:
- Per-world auto-clear messages** The auto-clear countdown and success messages (and their sounds) went to every online player regardless of the world they were in. The new list limits them to players in the named worlds (case-insensitive). An empty list — the default, also when the key is missing from an existing config — keeps the old behaviour of messaging every world.
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- Nothing
### Fixed:
- Holograms and shop items from other plugins no longer get cleared.** Until now ClearLag only protected holograms from DecentHolograms, HolographicDisplays and FancyHolograms. Chest-shop plugins that create their own holograms and floating display items (for example mc-PlayerShop) lost them on every auto-clear. ClearLag now recognises these on its own, no matter which plugin placed them: hologram/display entities, click hitboxes, and floating items that can never be picked up, never despawn, have no gravity or sit on another entity. Normal dropped items are not affected. On by default, can be turned off with
hooks.holograms.plugin-displays-immune: false.
- Item Merge no longer touches shop display items.** A shop's floating item could previously be merged with a matching dropped item next to it and disappear.
### Removed:
- Nothing
### Added:
- Dry-Run for clears.**
/clearlag clear <items/entity/all> --previewshows what a clear would remove without removing anything. You get the total, split into items and entities, a ranking of the most common types and a breakdown per world. It uses the exact same rules as a real clear, so exclusions, plugin hooks, WorldGuard regions, death-item protection, mob stacking and per-world profiles all behave identically.--dry-runand-pwork as well.
- New permission**
clearlag.previewlets staff run the preview without giving them the right to actually clear.
- Skip-If-Empty.** New option
auto-clear.skip-if-empty. When there is nothing worth clearing, the countdown broadcasts and the clear itself are skipped. No more "Clearing in 60 seconds..." followed by "0 entities have been removed" on a quiet server. You can set how many entities count as worthwhile (min-entities) and skip the countdown and the clear independently.
- Villager / AI Throttle.** New section
villager-optimization. Turns off the AI of villagers while no player is within the configured radius, and turns it back on the moment somebody comes close, right-clicks the villager or hits it. Villagers are the most expensive vanilla mob to tick, and since they must never be removed, this is the only way to get that time back. Other pathfinding-heavy mob types can be added to the list. Frozen mobs are tracked and always restored on enable, reload and shutdown, so nothing stays frozen. Mobs that were disabled by an operator or another plugin are never touched.
- Anti-Crash Item Limits.** New section
anti-crash-items. Blocks items with metadata large enough to crash a client or stall the server: oversized display names, huge amounts of lore, extreme enchantment levels, books with absurd page counts or page lengths, shulker boxes nested inside each other, and items whose total data size is far beyond anything legitimate. Checked when an item is dropped, renamed in an anvil, or signed as a book. Three modes:strip(trim and keep the item),cancel(block it) andlog-only(only report, change nothing) so you can see what your server would catch before enforcing anything. Staff withclearlag.anticrash.alertget notified, rate-limited.
- Performance History.** New section
metrics-historyplus the command/clearlag history <30m/24h/7d>. TPS, MSPT, CPU, RAM, entity, item, chunk and player counts are written to a local database and kept for a configurable number of days. The command shows averages, lowest TPS, peaks, the worst period in the window and a coloured trend line, so "was the server laggy last night?" can finally be answered. New permissionclearlag.history.
### Fixed:
- Chunk scans no longer freeze the server for a moment.
/clearlag chunkfinderand the Auto-Unload task used to walk every loaded chunk within a single tick, which on a large server caused exactly the lag spike Auto-Unload is meant to prevent. The scan is now spread over several ticks with a configurable budget (new sectionchunk-scan). Setchunk-scan.time-sliced: falseto get the old behaviour back. /clearlag chunkfindernow also shows how many items and how many mobs are in each chunk, so you can tell at a glance whether a hot chunk is a dropped-item pile or a mob farm./clearlag clearwith an invalid type now shows the correct usage instead of silently doing nothing and reporting "0 entities removed".
### Removed:
- Nothing removed in this version.
### Added:
- Nothing new in this release.
### Fixed:
- Item merging removed dropped items silently. When two stacks of the same item were merged, the absorbed one was deleted without announcing it, so other plugins were never told and could not prevent it, and nothing about it appeared in the debug log. It now uses the same removal path as every other feature and is reported as item merging.
- The debug log can now be used to rule the plugin out. With that last gap closed, every entity ClearLag deletes is written to the console while debug mode is on, without exception. If something disappears from your world and no removal line appears for it, ClearLag was not the cause — which makes it far quicker to tell whether a missing mob or item is down to this plugin, another plugin, or your server settings.
### Removed:
- Nothing removed in this release.
### aAdded:
- Every entity ClearLag deletes is now written to the console while debug mode is on, together with the feature that caused it — scheduled clear, manual clear, kill mobs, AI-Optimization, mob spawn limiter, mob stacking, projectile limiter or nuke — plus the entity type, its custom name and its coordinates. Until now the debug output only ever reported what was kept, so a report of "ClearLag removed my mob" could neither be confirmed nor ruled out. If something disappears and no removal line appears for it, ClearLag was not the cause.
- Dropped items are now reported with their actual item type instead of just "item", so they can be matched directly against the excluded items list.
- The reason a mob was spared is now named in the log: whether it survived because it has a custom name, because it is breedable, or because it carries the exclusion tag.
### Fixed:
- Mob stacking removed mobs without announcing it, so other plugins were never told and could not prevent the removal, and nothing about it appeared in any log. It now uses the same removal path as every other feature.
- The debug line for a spared mob was easy to mistake for a removal notice — it looked like a deletion but was in fact printed the moment a mob was protected. It now states clearly that the mob was kept.
- Removal messages for AI-Optimization and for item clearing were written before the removal was actually carried out, so they could report removals that never happened.
- The version number reported by the plugin did not match the release it shipped in, which made it impossible to tell from the version alone whether a fix was included.
### Removed:
- The separate removal messages for AI-Optimization and for item clearing. Both are replaced by the single unified removal message, which reports the same information in one place. The distance that triggered an AI-Optimization despawn is still included there.
### Added:
- Debug logging
[AIOptRemove]for AI-Optimization mob despawns including location coordinates and player distance. - Debug logging
[ClearItem]for item auto-clear decisions (kept (excluded)/removed).
### Fixed:
- Issue where entities in
auto-clear.excluded-entitieswere still being removed by AI-Optimization distance despawns whenuse-exclude-lists: true.
### Removed:
- Legacy
[DEBUG] Removed mob:debug log format in favor of structured[AIOptRemove]logs.
### Added:
- Nothing
### Fixed:
- AI-optimization despawning
### Removed:
- Nothing
### Added:
- Nothing
### Fixed:
- Cured Mobs Spawn Limiter
### Removed:
- Nothing
### Added:
- Hopper Optimization**
- Farm Limiter**
- Redstone Optimization**
- LevelledMobs level filtering**
### Fixed:
- AFK Simulation**
- AFK warning countdown**
- AFK titles**
- Spark Profiler**
### Removed:
- Nothing in this Update
### Added:
- Nothing
### Fixed:
- WildStacker Hook
### Removed:
- Nothing
### Added:
- Mob-Spawn-Limiter Periodic Enforcement
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- Nothing
### Fixed:
- Updater Config Key
### Removed:
- Nothing
### Added:
- ItemsAdder Hook
- Configurable Fade-In/Fade-Out for Countdown Messages in the Title
- Translatable "second"/"seconds" etc for Title via messages.yml
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- BossBar color change based on TPS
- Lag-Snapshot as Discord Embed
- Server Uptime at /cl specs
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- Per Mob Typ Cap
- Dropper/Dispenser Limiter
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- 2 New Config Keys for Item Merging
### Fixed:
- Enhanced ItemMerge Feature
### Removed:
- Fixed
### Added:
- Command Blacklisting
### Fixed:
- Missing Message Keys (found by ShadowHunter)
### Removed:
- Nothing
### Added:
- Maximum Stack Limit
### Fixed:
- Remove Effects under 1.21 throwing error
### Removed:
- Nothing
### Added:
- Smart Stacking** (If enabled, items can stack beyond the normal limit (e.g., 64) and non-stackable items (like potions) can be merged if they are identical)
- Removal Effects** (Played when entities are removed by auto-clear or manual clear)
- Fire/Lava Spread Limiter** (Limits how often fire can spread or lava can create new fire/flow)
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- Custom Bstats Metrics
### Fixed:
- Nothing
### Removed:
- Nothing
### Added:
- Auto Clear Countdown Time Formatting Option
### Fixed:
- /cl killmobs | /cl clear Command for Spawned Mobs via Spawners
### Removed
- Nothing
### Added:
- Nothing
### Fixed:
- Fixed Config Keys for New Features in Update 1.7.6
### Removed:
- Nothing
# Changelogs:
### Added:
- Tile Entity Limiter**: Limits the number of tile entities (chests, furnaces, hoppers, etc.) per chunk and globally. Prevents lag from massive storage systems. Configurable via
optimizations.tile-entity-limiter. - Spawner Limiter**: Limits mobs spawned by mob spawners per chunk and globally. Prevents lag from massive spawner farms. Configurable via
optimizations.spawner-limiter. - Piston/Slime Block Limiter**: Limits fast piston contraptions (flying machines, etc.) that cause server lag. Blocks piston activity in chunks with excessive piston events for a configurable duration. Players are notified when blocked. Configurable via
optimizations.piston-limiter. - Breeding Limiter**: Limits the number of breedable animals per chunk and globally. Prevents massive animal farms from causing lag. Configurable via
optimizations.breeding-limiter. - Packet Rate Limiter (ProtocolLib required)**: Limits the number of packets a player can send per second to prevent lag and crash exploits. Players exceeding the limit are warned, temporarily blocked, and eventually kicked. Bypass permission:
clearlag.packetlimit.bypass. Configurable viapacket-rate-limiter. Auto-disables if ProtocolLib is not installed.
### Fixed:
- Piston Limiter**: Added player notification when piston activity is blocked in a chunk. Added configurable block duration (
block-duration-seconds). - Breeding Limiter**: Changed from counting only breedable adults to counting all
Breedableanimals (includes babies). Added debug logging whendebug-modeis enabled. - Packet Rate Limiter**: Uses Reflection to avoid class loading errors when ProtocolLib is not installed. Plugin now starts normally even when the feature is enabled but ProtocolLib is missing.
#### Removed:
- Nothing removed in this update.
### Added:
- Nothing
### Fixed:
- The function that measures CPU usage briefly "froze" the server because it was too slow and running directly within the server's main process. It is now running in the background to prevent the server from freezing.
### Removed:
- Nothing
- Fixed Nametags for MobStacking
- Fixed MetaData for MobStacking
- Forgot to add an Safety Check to the /cl clear | /cl killmobs command
### Added:
- Nothing
### Fixed:
- /Clearlag clear Command Exclusion
### Removed:
- Nothing
### Added:
- Debug Log for Plugin Hooks
### Fixed:
- Citizens Hook
### Removed:
- Nothing
(This Update brings many new features and not all are fully tested So, bugs can occur, and it's also possible that functions that worked in version 1.6 were changed in version 1.7. If you find any Bugs, just let me know on my DC)
### Added:
- Added hex color formatting support for messages and language strings. Supported formats:
&#RRGGBB,#RRGGBB, and<color:#RRGGBB>...</color>. - Support for Nexo and Oraxen: custom items and custom entities from these plugins are now protected from being cleared. Can be toggled in the config.
- Support for MythicMobs: MythicMobs entities are now protected from being cleared and killed by ClearLag. Can be toggled in the config.
- Support for EliteMobs: EliteMobs entities are now protected from being cleared, killed, and from having their AI disabled by ClearLag. Can be toggled in the config.
- Support for Citizens: NPCs created by Citizens are now immune to all ClearLag removal actions. Can be toggled in the config.
- Support for FancyNpcs: NPCs created by FancyNpcs are now immune to all ClearLag removal actions. Can be toggled in the config.
- Support for Shopkeepers: Shopkeeper entities are now immune to all ClearLag removal actions. Can be toggled in the config.
- Support for DecentHolograms and HolographicDisplays: hologram entities are now immune to all ClearLag removal actions. Can be toggled individually in the config.
- Support for FancyHolograms: hologram entities created by FancyHolograms are now immune to all ClearLag removal actions. Can be toggled in the config.
- Time-Based Rules: auto-clear behavior can now differ between day, night, and a special event mode. Each period has its own toggles for clearing items/mobs and a removal multiplier. New commands:
/clearlag timerules <status|on|off|eventon|eventoff>. - Per-World Profiles: each world can now have its own auto-clear interval, removal limits, and exclude lists. New commands:
/clearlag worldprofiles <status|on|off>and/clearlag worldprofiles world <worldname> <on|off|status>. - Recent-Activity Protection: items that drop near a player will be protected from being cleared for a configurable amount of time. Can be toggled and configured in the config.
### Fixed:
- Custom items and entities from Nexo and Oraxen were incorrectly being cleared along with regular items and mobs. They are now properly protected.
- Plugin-managed custom mobs (e.g. from Nexo/Oraxen) could have their AI disabled by the AI optimization feature. This is now prevented when the respective config option is enabled.
/clearlag killmobsnow respects all hook protection settings (MythicMobs, EliteMobs, Citizens, Shopkeepers, Holograms) depending on your config.- Auto-clear now consistently checks all hook protections across every removal path.
- Fixed a permission bypass where
/clearlag togglemessages,/clearlag togglesound, and/clearlag togglemessagecould be used without their specific permission when command hiding was disabled. - Fixed misleading feedback for
/clearlag togglesound: when countdown sounds are globally disabled, players now receive a proper feature-disabled message instead of a permission error.
### Removed:
- Nothing removed in this update.
