ClearLaggEnhanced
A modern lag prevention plugin for Paper, Spigot, Purpur and Folia. It handles entity clearing, per-chunk limits and performance monitoring, and every module has an in-game admin GUI.
Features
- Automatic entity clearing with smart protection and adaptive scheduling
- Mob, spawner and misc entity limiters
- Live TPS and memory monitoring
- In-game admin GUI for every module
- Native Folia support
- PlaceholderAPI, stacker plugin and claim plugin integrations
Requirements
- Minecraft 1.20+
- Paper, Spigot, Purpur or Folia
- Java 21+
Installation
- Download the latest release from Modrinth.
- Drop the jar into your
pluginsfolder. - Restart the server.
Documentation
Everything else, including commands, permissions, configuration, modules and integrations, is on the wiki.
Support
- Bugs and feature requests: GitHub Issues
- Questions and help: Discord
Credits
- bob7l, original ClearLagg developer
- djtmk, developer and maintainer
- R00tB33rMan, Folia support
- MrTroxy, modular system
License
Licensed under the BusyBee AAR License.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 | ||||
| 3h ago | 1 |
- New developer API allowing other plugins to hook into Entity Clearing (CLE).
- Direct ItemsAdder API integration for reliable protection of custom entities and furniture.
- Artifact publishing migrated to repo.busybeedev.net from JitPack.
Fixed
- A double heading issue in the documentation.
- An issue where chunk placement caps ignored developer API protections and incorrectly removed protected entities.
- Vehicle and hanging entity checks so they properly respect
protect.namedandprotect.tagson creation. - Packet limiter handling to properly skip ProtocolLib temporary players.
Removed
- Nothing
- Startup warnings for invalid entries in the item whitelist to catch misconfigurations early.
Changed
- Whitelist protection rules now strictly apply across all entity removal paths and systems, including MythicMobs and InfernalMobs.
- Whitelisted entity names now automatically match across past and present game versions, preventing old config names from being ignored.
- Dual-type entries (such as Tridents, Armor Stands, Minecarts, and Boats) are now protected in both item and entity forms when whitelisted.
- The configuration updater no longer rewrites or resets settings files, fully preserving custom whitelists, comments, and deleted settings across updates.
Fixed
- An issue where whitelisted villagers or entities were accidentally cleared during chunk-limit sweeps.
Removed
- Nothing
Added
- Server pause detection now hooks directly into the global scheduler for improved accuracy.
- Notice regarding the upcoming removal of built-in entity stacking and stacker integrations in future releases.
Fixed
- Nothing
Removed
- Nothing
- Automatic pause for auto-clear countdowns whenever the server is paused.
- Extra protections for saddled/ridden mobs, player-ridden entities, and fish or axolotls released from buckets.
- Protection for entities tagged with
CLE_PROTECTEDacross all clear routines. - Console warnings during startup if a whitelist entry contains a typo or invalid entity name.
- Updated documentation covering new entity protections and server pause behaviors. https://busybeedev.net/docs/clearlaggenhanced/intro
Fixed
- Issues where player-owned mobs, MythicMobs, or InfernalMobs could still be cleared under certain conditions.
Removed
- Nothing
- Nothing
Fixed
- An issue where MiniMessage color tags containing hex values would render as raw text instead of displaying the correct color.
Removed
- Nothing
- Per-message notification overrides to give you fine-grained control over alerts.
- Automatic updates for official documentation at https://busybeedev.net/docs/clearlaggenhanced/intro.
Fixed
- An issue where the {prefix} placeholder was broken and failed to display correctly.
- Suppressed a false-warning message during startup regarding faststats properties overlap.
Removed
- The unverified ModDex integration to improve stability and performance.
- None
Fixed
- Prevented a crash during plugin startup if the database fails to connect.
Removed
- Unnecessary background library to improve plugin performance and file size.
- None
Fixed
- Corrected an issue where warning updates behaved inversely from expected.
Removed
- None
- ChunkUtils utility to safely handle chunk loading
Fixed
- Refactored modules to leverage ChunkUtils utility for chunk loading
Removed
- Nothing
- Added
broadcastPermissionMessageutility to support permission-based broadcasting. - Integrated permission-based broadcasting for performance snapshot notifications.
## Fixed
- Optimized chunk key calculations in
GlobalEntityRegistryusing bitwise operations for significantly improved performance.
## Removed
- Disabled default
packet-limiterandafksettings inconfig.yml.
Added
- Soft dependency support for ProtocolLib
Fixed
- Improved packet handling performance and stability (ProtocolLib integration)
- Streamlined internal notification processing
- Action bar support for notifications
- Customizable sounds for notifications
Removed
- Nothing
### 🚀 New Features
- AFK Module:** Added a dedicated AFK tracking module complete with customizable configuration options.
- Packet Limiter Module:** Introduced a packet limiter module to help protect the server against packet floods and exploits.
### ⚡ Performance & Tweaks
- Performance Enhancements:** Optimized internal event handling and module processing for smoother server performance.
- Integration Updates:** Updated integration handlers to ensure better compatibility across dependencies.
### 🐛 Bug Fixes
- Inventory Management:** Fixed a
ConcurrentModificationExceptionand prevented potentialNullPointerExceptions inFastInvManager.closeAllduring server shutdown.
### ⚙️ Internal Changes
- Moved inventory management backend (
FastInvandFastInvManager) into the internal library structure (libs.fastinv).
### ✨ Features
- Integrated
FastInv,FastInvManager, andItemBuilderutilities to improve plugin performance and streamline menu and inventory management.
- Remove outdated configuration files for
ModernShowcase,RoseStacker, andWildStackerintegration modules. - Fixed an issue with the whitelist items that effected LEADS in all stages.
- Advanced Entity Protection:**
- Added full protection for **Infernal Mobs** and **RareMob** metadata to keep your rare spawns safe from entity clears.
- Persistent named entities are now automatically protected by default.
- ModDex Integration:** Added comprehensive configuration and logic checks to protect entities within the
mobdexnamespace. - GriefPrevention3D Integration:** Implemented deep integration featuring lifecycle management and claim-aware entity protection. Your entity-clearing configuration now fully respects **GriefPrevention3D** claims and subdivisions!
- Documentation Update:** Updated the README to reflect new commands, configuration options, and the updated **Java 21** requirement.
## 📦 Supported Plugin Links
We have expanded our ecosystem to support the following plugins:
- [MobDex](https://www.spigotmc.org/resources/mobdex.132583/)
- [GriefPrevention3D](https://modrinth.com/plugin/griefprevention-3d-subdivisions)
- [Infernal Mobs](https://www.spigotmc.org/resources/infernal-mobs.2156/)
### ⚙️ System Requirements
- Java 21** or higher is now required.
### 🛠️ Fixes & Refinements
- Enhanced Stacked Entity Protection:** Refined and optimized the internal checks for custom naming and custom NBT tags on stacked entities. This ensures that unique, named, or custom-tagged entities are more accurately identified and protected from accidental merging or clearing.
- Folia Fixes** Fixed the issue with folia not running on the correct thread for world entity checks. Please update to the newest version.
### 🚀 New Features
- FoliaUpdateNotifier:** Added a dedicated update checker and logger for Folia server environments. The plugin will now automatically check for and log available updates directly in the console, ensuring your Folia server stays up-to-date with the latest performance and stability improvements.
- Faster Sweeps:** Miscellaneous entity processing is now handled more efficiently by targeting and scheduling chunk processing at specific locations rather than sweeping blindly.
- Reliable Scheduling:** Refactored internal timers to resolve some scheduling inconsistencies, ensuring automated tasks and performance gates trigger exactly when they are supposed to.
### ⚙️ Configuration & Features
- Mob Limiter Expansion:** Added a new
ignore-spawnersoption to the mob limiter configuration, giving server administrators finer control over which entities are targeted by clear cycles.
### 🛠️ Backend & Performance
- Internal Package Refactor:** Updated internal package paths to
net.busybee.clearlagenhancedfor better consistency, improved project structure, and modernized build configurations. - Dependency Updates:** Updated internal project versions, compiler source/target compatibility, and shaded library paths to optimize overall resource usage.
- Metrics Integration:** Integrated **BStats** and **FastStats** metrics frameworks to significantly enhance real-time performance monitoring, lag tracking, and server health analytics.
- MythicMobs Support:** Native integration ensuring Mythic entities are correctly identified and handled by protection systems.
### 🐛 FIXES
- Placeholders:** Resolved an issue where certain PAPI expansion values were not displaying or updating correctly.
### 🔧 CHANGES
- Documentation:** Refreshed the internal and external Wiki links to reflect new integration settings.
- Citizens Integration:** All Citizens NPCs are now officially recognized and protected from clearing cycles.
- Environmental Immunity:** NPCs in protected zones are now immune to accidental player damage and environmental hazards.
### 🐛 FIXES
- Entity Logic:** Refined clearing logic to ensure shopkeepers and custom NPCs are never accidentally deleted.
### ⚡ PERFORMANCE
- Stability:** General internal optimizations regarding NPC-to-protection-module communication.
- Code Refactoring:** Cleaned up several legacy manager classes to improve maintainability.
- Dependency Updates:** Updated internal libraries to ensure compatibility with the latest Paper/Spigot builds.
- Full Changelog: [Click Here](https://busybeedev.net/changelog)
### 🛡️ Smart Entity Management
- Adaptive Intervals:** The plugin now dynamically adjusts clearing frequency based on server load.
- MSPT Performance Gate:** Clearing tasks now wait for a healthy performance window before executing, preventing "lag-clearing-lag."
- Tag Protection:** Added configuration to protect specific entities from clearing via entity tags.
- New Status Command:** Monitor your adaptive intervals and performance gates in real-time.
### ⚡ Optimization & Fixes
- Mob Limiter Boost:** Optimized protection checks to reduce CPU overhead during mob limiting.
- Faster Sweeps:** Miscellaneous entity processing is now handled more efficiently across chunks.
- Reliable Reloads:** Refactored the plugin reload process to ensure all listeners and services cycle correctly without memory leaks.
- Startup Stability:** Fixed a critical crash during the protection settings initialization.
### 🎨 UI & Quality of Life
- FastInv Migration:** Menus are now faster and more stable thanks to the FastInv framework.
- Improved GUIs:** The entity management interface now supports and displays adaptive interval settings.
- Consistency:** Standardized ChatColor usage and updated help entries for better clarity.
- Database Overhaul:** Full support for SQLite and MySQL with strict schema versioning.
- Protection Settings:** Added the
ProtectionSettingsrecord for granular entity and area safeguards. - ChatInputManager:** Implemented for more robust player input handling in the Admin GUI.
### 🐛 FIXES
- Memory Leaks:** Fixed a leak where database pools wouldn't close during plugin reloads.
- Logic Cycles:** Improved clearing logic to prevent infinite loops and duplicate entity processing.
- Permissions:** Standardized permission checks across all subcommands and tab-completion.
### 🔌 INTEGRATIONS
- WildStacker:** Native API support for stacked entities and items.
- ModernShowcase:** Optimized loading order for immediate protection of showcase items.
### 🔧 CHANGES
- Config Authority:** The
config.ymlnow overrides Admin GUI toggles to maintain a consistent "source of truth." - Configuration:** Complete refresh of
config.ymlwith clearer headers and helpful comments.
### 🛡️ Entity Protection & Management
- Armored Entity Safekeeping:** Introduced the
protect-armored-entitiesconfiguration option. When enabled, the clearing logic will now skip any entities equipped with armor (Armor Stands, Zombies, Skeletons, etc.). - Logic Updates:** * Refactored
LagPreventionManagerandEntityManagerto respect protection flags. - Adjusted auto-clear routines to include armored entity detection during sweeps.
### ⚙️ System & Internal Improvements
- Smarter Config Migration:** Refactored
ConfigMigratorfor a more maintainable and reliable YAML merging strategy during updates. - Enhanced Debugging:** Improved logging and internal timers for better task management and performance tracking.
- Refined Stability:** Enhanced error handling for configuration reloads and minor internal improvements to the
NotificationManager.
### 📦 Technical Changes
- Refactoring:** Cleaned up core entity management classes to improve long-term maintainability.
- Smart Config Migration:** Introduced
ConfigMigratorfor intelligent YAML merging. It now preserves your custom comments while automatically injecting new keys and removing obsolete ones. - Automatic Backups:** The system now generates safety backups before performing configuration updates.
- Version Bump:** Project version updated to **2026.3.0**.
- If you're upgrading from an older version, please check your
plugins/CLE/backupsfolder for copies of your previous configurations.*
### 🛠 Core Improvements & Cleanup
- General Refactor:** Cleaned up multiple aspects of the codebase and removed several unused aspects to improve maintainability.
- Paper Optimization:** Migrated chunk loading to utilize
getChunkAtAsyncfor better server performance and reduced main-thread hitching. - Configuration Logic:** * Implemented "Smart Configuration" updates that preserve user comments during config merges.
- Bumped internal
config-versionandmessages-version.
### 🛡 Entity & Stacking Logic
- Stacking Fix:** Prevented stacking logic from erroneously affecting players.
- Behavior Update:** Adjusted default behavior for stacked entities (
protect-stacked-entitiesnow defaults tofalse). - Entity Limits:** Removed default chunk limits for
ARMOR_STAND,ITEM_FRAME, andGLOW_ITEM_FRAMEto prevent unintended despawning of decorative items.
- Code clean-up and optimization
- PlaceholderAPI Expansion:** Added
ClearLaggEnhancedExpansionfor use in scoreboards and tab lists. - bStats:** Added metrics tracking to help visualize global performance trends.
### ⚡ PERFORMANCE
- Task Management:** Replaced legacy scheduler methods with
WrappedTaskfor more efficient task cancellation.
### 🔧 CHANGES
- Shutdown Logic:** Centralized the cleanup process to ensure all managers shut down gracefully during reloads.
> **Config Version:**
5<details>
<summary>New Features</summary>
### ✨ New Features
- Added new entity-clearing configuration options:
protect-stacked-entitieswhitelist-all-mobs- Added dynamic GUI toggles for:
- Entity-clearing settings
- Lag-prevention settings
- GUI now updates dynamically when settings are toggled, improving responsiveness and usability.
</details>
<details>
<summary>Improvements</summary>
### 🔧 Improvements
- Refactored entity-clearing logic to properly respect:
- Stacked entity protections
- Whitelisted mobs and items
- Consolidated and simplified protection checks within
shouldClearEntity. - Improved stacked entity handling in:
RoseStackerHookWildStackerHook- Ensured proper stack removal with robust fallback logic for invalid or partially-stacked entities.
- Improved stacking API validation and removed redundant code paths.
- Simplified configuration by reducing mob and item whitelists for cleaner management.
- Improved config and message handling by safely merging defaults with user-defined settings.
- Optimized performance and reduced redundancy across entity-clearing and event handling logic.
</details>
<details>
<summary>Maintenance</summary>
### 🧹 Maintenance & Cleanup
- Fixed a potential memory leak related to notification handling.
- Resolved scheduling issues and improved task cleanup.
- General cleanup and internal refactoring.
</details>
<details>
<summary>Depend Updates</summary>
### 📚 Dependency Updates
- Updated **RoseStacker** to the latest version.
- Added WildStacker and updated to latest version.
- Updated **Adventure** to modern baselines (older
4.26.0no longer compiled correctly).
</details>
<details>
<summary>Bug Fixes</summary>
### 🪲 Bug Fixes
- Fixed cases where stacked entities were not properly removed or validated.
- Improved fallback behavior for invalid stacked entities.
- Fixed desync issues between GUI toggles and internal entity-clearing / lag-prevention states.
</details>
<details>
<summary>Removed</summary>
### 🗑️ Removed
- Removed
debug.entity-clearingconfiguration option. - Removed all related debug logging across entity-clearing logic and stacking hooks.
- Updated
READMEandconfig.ymlto reflect the removal of debug settings.
</details>
💡 **Note:** This update introduces a new config version (
5). Existing configurations will be automatically merged with new defaults.