Sueta

ClearLaggEnhanced

26.9.6

The definitive ClearLagg successor for 1.20+. Boost TPS and fix lag on Paper, Spigot, and Folia with smart entity clearing and a real-time Admin GUI.

·Plugin
  1. 26.9.6latestClearLaggEnhanced 26.9.6Sep 25, 2026
    Note: Version 26.9.5 was skipped due to more changes in 26.9.6 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
    420 downloads
  2. 26.9.4ClearLaggEnhanced 26.9.4Sep 23, 2026
    Added - 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_PROTECTED across 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
    149 downloads
  3. 26.9.3ClearLaggEnhanced 26.9.3Sep 22, 2026
    Added - Nothing Fixed - An issue where MiniMessage color tags containing hex values would render as raw text instead of displaying the correct color. Removed - Nothing
    74 downloads
  4. 26.9.2ClearLaggEnhanced 26.9.2Sep 20, 2026
    Added - 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.
    172 downloads
  5. 26.9.1ClearLaggEnhanced 26.9.1Sep 13, 2026
    Added - 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.
    701 downloads
  6. 26.9.0ClearLaggEnhanced 26.9.0Sep 11, 2026
    Added - None Fixed - Corrected an issue where warning updates behaved inversely from expected. Removed - None
    294 downloads
  7. 26.8.0ClearLaggEnhanced 26.8.0Aug 4, 2026
    Added - ChunkUtils utility to safely handle chunk loading Fixed - Refactored modules to leverage ChunkUtils utility for chunk loading Removed - Nothing
    3563 downloads
  8. 26.7.3ClearLaggEnhanced 26.7.3Jul 28, 2026

    Added

    * Added broadcastPermissionMessage utility to support permission-based broadcasting. * Integrated permission-based broadcasting for performance snapshot notifications.

    Fixed

    * Optimized chunk key calculations in GlobalEntityRegistry using bitwise operations for significantly improved performance.

    Removed

    * Disabled default packet-limiter and afk settings in config.yml.
    679 downloads
  9. 26.7.2ClearLaggEnhanced 26.7.2Jul 22, 2026
    To view the full changelog [click here](https://busybeedev.net/changelog?project=clearlaggenhanced) 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
    511 downloads
  10. 2026.7.1ClearLaggEnhanced 2026.7.1Jul 21, 2026
    To view the full changelog please [click here](https://busybeedev.net/changelog?project=clearlaggenhanced)
    🚀 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 ConcurrentModificationException and prevented potential NullPointerExceptions in FastInvManager.closeAll during server shutdown.
    122 downloads
  11. 2026.7.0ClearLaggEnhanced 2026.7.0Jul 8, 2026
    To view the full changelog please go to https://busybeedev.net/changelog?project=clearlaggenhanced
    ⚙️ Internal Changes
    * Moved inventory management backend (FastInv and FastInvManager) into the internal library structure (libs.fastinv).
    ✨ Features
    * Integrated FastInv, FastInvManager, and ItemBuilder utilities to improve plugin performance and streamline menu and inventory management.
    1328 downloads
  12. 2026.6.1ClearLaggEnhanced 2026.6.1Jun 22, 2026
    * Remove outdated configuration files for ModernShowcase, RoseStacker, and WildStacker integration modules. * Fixed an issue with the whitelist items that effected LEADS in all stages.
    1502 downloads
  13. 2026.6.0ClearLaggEnhanced 2026.6.0Jun 19, 2026

    🚀 Features & Enhancements

    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 mobdex namespace. 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.
    334 downloads
  14. 2026.5.3ClearLaggEnhanced 2026.5.3May 25, 2026
    To view the full changelog please [click here](https://busybeedev.net/changelog?project=clearlaggenhanced)
    🛠️ 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.
    1736 downloads
  15. 2026.5.2ClearLaggEnhanced 2026.5.2May 22, 2026
    ⚡ Optimization & Fixes
    - 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.
    263 downloads
  16. 2026.5.1ClearLaggEnhanced 2026.5.1May 20, 2026
    To view the full changelog please go to [CLE Changelog](https://busybeedev.net/changelog?project=clearlaggenhanced)
    ⚙️ Configuration & Features
    Mob Limiter Expansion:* Added a new ignore-spawners option 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.clearlagenhanced for 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.
    663 downloads
  17. 2026.5.0ClearLaggEnhanced 2026.5.0May 11, 2026
    Updated for MC Version 26.x+
    767 downloads
  18. 2026.4.9ClearLaggEnhanced 2026.4.9Apr 28, 2026
    ✨ FEATURES
    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.
    719 downloads
  19. 2026.4.8ClearLaggEnhanced 2026.4.8Apr 25, 2026
    ✨ FEATURES
    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.
    78 downloads
  20. 2026.4.7ClearLaggEnhanced 2026.4.7Apr 14, 2026
    🔧 CHANGES
    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.
    684 downloads
  21. 2026.4.6ClearLaggEnhanced 2026.4.6Apr 14, 2026

    🚀 Performance & Optimization Update

    **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.
    55 downloads
  22. 2026.4.1ClearLaggEnhanced 2026.4.0 and 2026.4.1Apr 1, 2026
    ✨ FEATURES
    Database Overhaul:* Full support for SQLite and MySQL with strict schema versioning. Protection Settings:* Added the ProtectionSettings record 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.yml now overrides Admin GUI toggles to maintain a consistent "source of truth." Configuration:* Complete refresh of config.yml with clearer headers and helpful comments.
    363 downloads
  23. 2026.3.1ClearLaggEnhanced 2026.3.1Mar 27, 2026

    Changelog - Version 2026.3.1

    🛡️ Entity Protection & Management
    Armored Entity Safekeeping:* Introduced the protect-armored-entities configuration option. When enabled, the clearing logic will now skip any entities equipped with armor (Armor Stands, Zombies, Skeletons, etc.). Logic Updates: Refactored LagPreventionManager and EntityManager to respect protection flags. * Adjusted auto-clear routines to include armored entity detection during sweeps.
    ⚙️ System & Internal Improvements
    Smarter Config Migration:* Refactored ConfigMigrator for 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.
    418 downloads
  24. 2026.3.0ClearLaggEnhanced 2026.3.0Mar 17, 2026

    ChangeLog

    Smart Config Migration:* Introduced ConfigMigrator for 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/backups` folder for copies of your previous configurations.
    416 downloads
  25. 2026.2.2ClearLaggEnhanced 2026.2.2Feb 27, 2026

    🚀 Version 2026.2.2

    🛠 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 getChunkAtAsync for better server performance and reduced main-thread hitching. Configuration Logic: Implemented "Smart Configuration" updates that preserve user comments during config merges. * Bumped internal config-version and messages-version.
    🛡 Entity & Stacking Logic
    Stacking Fix:* Prevented stacking logic from erroneously affecting players. Behavior Update:* Adjusted default behavior for stacked entities (protect-stacked-entities now defaults to false). Entity Limits:* Removed default chunk limits for ARMOR_STAND, ITEM_FRAME, and GLOW_ITEM_FRAME to prevent unintended despawning of decorative items.
    634 downloads
  26. 2026.2.1ClearLaggEnhanced 2026.2.1Feb 26, 2026

    Changelog

    * Code clean-up and optimization
    48 downloads
  27. 2026.2ClearLagg Enhanced 2026.2Feb 4, 2026
    ✨ FEATURES
    PlaceholderAPI Expansion:* Added ClearLaggEnhancedExpansion for use in scoreboards and tab lists. bStats:* Added metrics tracking to help visualize global performance trends.
    ⚡ PERFORMANCE
    Task Management:* Replaced legacy scheduler methods with WrappedTask for more efficient task cancellation.
    🔧 CHANGES
    Shutdown Logic:* Centralized the cleanup process to ensure all managers shut down gracefully during reloads.
    616 downloads
  28. 2.3ClearLagg Enhanced 2.3Dec 17, 2025

    🚀 CLE Beta-v2.3

    Config Version: 5
    <details> <summary>New Features</summary>
    ✨ New Features
    - Added new entity-clearing configuration options: - protect-stacked-entities - whitelist-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: - RoseStackerHook - WildStackerHook - 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.0 no 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-clearing configuration option. - Removed all related debug logging across entity-clearing logic and stacking hooks. - Updated README and config.yml to 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.
    899 downloads
  29. 2.2ClearLagg Enhanced 2.2Nov 21, 2025
    Changes: - Added more than one notification feature. (Can have all 3 notification methods enabled if you so wish.) - Code cleanup - Changed config version to #4 (Should auto update when you run the new update)
    878 downloads
  30. 2.1ClearLagg Enhanced 2.1-AlphaNov 12, 2025
    Updates: - Removed Hopper Limiter due to high thread usage. - Removed Redstone Limiter due to aggressive behavior. Redstone Limiter will return after the rework is complete. No need to update the plugin, disable those two features.
    120 downloads
  31. 2.0-BetaClearLagg Enhanced 2.0-BetaOct 14, 2025
    Update 2.0 The Folia Update! - Reworked redstone limiter - 100% supports folia - Updated README - Optimized plugin performance (0.1% thread usage) - Optimized SQLite Database A helpful guide for the Redstone Limiter: <details> <summary>🔌 Using the Redstone Limiter</summary>

    🔌 Using the Redstone Limiter

    The Redstone Limiter prevents lag caused by excessive redstone activity while allowing normal farms and contraptions to function properly.
    How It Works
    The limiter tracks redstone events at two levels: 1. Per-block tracking - Monitors individual redstone components 2. Per-chunk tracking - Monitors total redstone activity in a chunk When a block or chunk exceeds its configured threshold within the reset period, the plugin neutralizes the excessive activity to prevent lag.
    Configuration
    Enable the redstone limiter in config.yml:
    redstone-limiter:
      enabled: true              # Set to true to enable
      reset-period-ms: 4000      # Reset counters every 4 seconds
    
      blocks:
        enabled: true
        threshold:
          GLOBAL: 6              # Default limit for all redstone blocks
          PISTON: 6              # Pistons can activate 6 times per reset period
          OBSERVER: 12           # Observers can trigger 12 times per reset period
          DISPENSER: 6
          REPEATER: 10
          HOPPER: 12
    
      chunks:
        enabled: true
        threshold: 4000          # Maximum total redstone events per chunk
    
      max-piston-push: 12        # Maximum blocks a piston can push at once
    Understanding Thresholds
    - reset-period-ms: How long before counters reset (4000ms = 4 seconds) - Block threshold: Maximum activations per block within the reset period - Chunk threshold: Maximum total redstone events in a chunk within the reset period - max-piston-push: Limits how many blocks a single piston can push (prevents lag from pushing hundreds of blocks)
    What Gets Limited
    The redstone limiter monitors these components: - Pistons (PISTON, STICKY_PISTON) - Observers (OBSERVER) - Dispensers (DISPENSER, DROPPER) - Repeaters (REPEATER, COMPARATOR) - Hoppers (HOPPER) - All other redstone components use the GLOBAL threshold
    Example Scenarios
    Normal redstone farm: - A typical automatic farm activates pistons 2-3 times per reset period - Will function normally with default settings Lag machine: - Rapid clock that activates pistons 50+ times per second - Gets neutralized when it exceeds the threshold (6 activations per 4 seconds) - Prevents server lag without affecting legitimate builds
    Tuning Recommendations
    For creative/building servers:
    redstone-limiter:
      enabled: true
      blocks:
        threshold:
          PISTON: 10           # Allow more complex contraptions
          OBSERVER: 20
          REPEATER: 15
      chunks:
        threshold: 8000        # Higher limit for creative builds
    For survival servers with farms:
    redstone-limiter:
      enabled: true
      blocks:
        threshold:
          PISTON: 6            # Standard settings work well
          OBSERVER: 12
      chunks:
        threshold: 4000
    For servers with lag issues:
    redstone-limiter:
      enabled: true
      blocks:
        threshold:
          PISTON: 4            # Stricter limits
          OBSERVER: 8
          REPEATER: 6
      chunks:
        threshold: 2000        # Lower chunk threshold
      max-piston-push: 8       # Reduce piston push limit
    Testing Your Settings
    1. Enable the redstone limiter with default settings 2. Monitor server TPS with /lagg tps 3. Test your redstone farms to ensure they still work 4. If legitimate farms are getting limited, increase the threshold for specific blocks 5. If you still have lag, decrease thresholds or lower the reset period
    Important Notes
    - The limiter is disabled by default - you must enable it in config.yml - Changes require a /lagg reload to take effect - The limiter only neutralizes excessive activity, it doesn't break or remove blocks - Players won't receive notifications when redstone is limited (happens silently) </details> Special Thanks to [R00tB33rMan](https://github.com/R00tB33rMan) for helping make this update possible. If you have any bugs please join the [Discord](https://discord.gg/abdm29q7af) and report them. <3
    543 downloads
  32. 1.4-BetaClearLaggEnhanced 1.4-BetaOct 5, 2025

    ClearLaggEnhanced Changelog

    [1.4-Beta]

    ✨ Added
    - Lombok Support - Added Lombok framework for cleaner code - Database Indexes - Added 3 strategic indexes to laggy_chunks table for 10-100x faster queries - idx_laggy_chunks_world - Fast world filtering - idx_laggy_chunks_entity_count - Fast sorting by entity count - idx_laggy_chunks_composite - Fast chunk lookups by coordinates - Auto-Update System - Config and messages files now automatically update while preserving user customizations - Automatic backups created (e.g., config.yml.backup-v1) - Smart merging of new values with user settings - Version tracking for both config.yml and messages.yml - Professional Messages - Complete overhaul of messages.yml - Consistent color scheme with documentation - Added icons (✓, ✗, ⚠, ⏰, ⚡, etc.) - Better formatting with borders and bullets - All messages now properly colored - Java Records - Converted data classes to use modern Java 17 records
    🔧 Changed
    - Entity Clearing Logic - Completely refactored for better UX - BREAKING: Removed confusing blacklist system - Now uses whitelist-only approach: "Clear everything EXCEPT whitelisted entities" - Items on ground (DROPPED_ITEM) now properly clear by default - Living entities clear by default unless whitelisted - Much more intuitive for server owners - Database Schema - Changed world column from TEXT to VARCHAR(255) - 50-70% storage reduction for world names - Better indexing performance - Config Defaults - Updated default world list - Changed from ["world_nether", "world_the_end"] to [] (all worlds) - More sensible defaults for new installations - Whitelist - Refined default protected entities - Added: CAT, PARROT, GLOW_ITEM_FRAME, CHEST_MINECART, FURNACE_MINECART, HOPPER_MINECART, CHEST_BOAT - Removed: OAK_BOAT (consolidated to BOAT)
    ⚡ Performance
    - Main Thread Optimization - Removed unnecessary runTask() calls - ClearCommand.java - Direct execution (saves ~1-2ms per operation) - MobLimiterListener.java - Direct execution in MONITOR event - Reduced main thread blocking and task queue overhead - Database Performance - Query speed improvements with new indexes - ChunkFinder queries 10-100x faster as data grows - Efficient world-specific filtering - Optimized sorting by entity count
    🐛 Fixed
    - Entity Clearing Bug - Items on ground now properly clear - Previous logic only cleared items in blacklist - New logic clears all non-whitelisted entities - Config Migration - Improved existing migration system - Better handling of deprecated keys - Clearer console output during migration - Fixed edge cases in setting preservation
    🗑️ Removed
    - Blacklist System - Removed from config.yml (36 lines) - Confusing two-list system replaced with simpler whitelist-only - Old blacklist entries automatically converted during migration
    📝 Technical Details
    - Lombok Dependency: 1.18.30 - Config Version: 1 → 2 (auto-migration implemented) - Messages Version: 1 → 2 (auto-migration implemented) - Java Version: 17 (using records and text blocks) - Code Cleanup: Removed all inline comments per project style ---

    Migration Guide

    From 1.3 to 1.4
    #### Automatic Migration When you first start v1.4, the plugin will: 1. Detect outdated config (v1) and messages (v1) 2. Create backups: config.yml.backup-v1 and messages.yml.backup-v1 3. Merge your customizations with new defaults 4. Log all migrated settings to console #### Manual Steps (Optional) None required! Everything is automatic. #### Breaking Changes 1. Blacklist Removed: If you relied on blacklist behavior, adjust your whitelist: - Old: Blacklist = entities to clear - New: Whitelist = entities to protect, everything else clears #### Reverting If you need to revert: 1. Stop server 2. Restore from backup: cp config.yml.backup-v1 config.yml 3. Edit config-version: 1 in config.yml 4. Start server with old plugin version ---

    Performance Impact

    | Optimization | Improvement | Details | |------------------|------------------------|-------------------------------| | Database Indexes | 10-100x faster queries | Scales with data volume | | Main Thread | ~1-2ms per clear | Immediate per-operation gain | | Database Schema | 50-70% less storage | VARCHAR vs TEXT efficiency | | Overall | Significantly better | Especially on large servers | | | | |
    173 downloads
  33. 1.3-BetaClearLaggEnhanced 1.3-BetaAug 26, 2025
    Added — Per‑Chunk Entity Limiter (Armor Stands, Boats, etc.)
    - New limiter that caps the number of specified non-mob entities per chunk (e.g., armor stands, boats, minecarts, item frames, paintings). - Actively detects over-cap scenarios even if players move entities into a chunk (e.g., via water streams, pistons)—not just at spawn time. - Automatically removes the excess entities beyond the configured cap and sends a staff notification with world, chunk coordinates, entity type, and count removed. - Fully configurable caps per entity type, worlds to include/exclude, check intervals, selection priority for removal, and notification throttling. - Optional bypass permission for trusted users so their placed entities are not counted or removed. #### Configuration - Configure per-entity caps per chunk, globally or per-world. - Choose which entities are monitored (e.g., ARMOR_STAND, BOAT, MINECART variants, ITEM_FRAME, PAINTING, TNT_MINECART, etc.). - Control how “excess” entities are chosen for removal (e.g., oldest first, furthest from center, random) to minimize disruption. - Set staff notification options (enabled, message format, permissions, cooldown to prevent spam) and console logging. - Define excluded worlds or regions if needed. #### Notifications and Permissions - Staff alert sent on first detection and then rate-limited: e.g., "[ClearLaggEnhanced] Chunk x=12,z=-34 in world ‘survival’: removed 8 excess ARMOR_STAND (limit=12)." - Console log entry mirroring the alert (optional). - Suggested permissions (adjust to your plugin’s scheme): - clearlagenhanced.limiter.notify — receive staff alerts - clearlagenhanced.limiter.bypass — player’s entities aren’t counted/removed #### Behavior - Triggers on spawn, chunk load, and periodic sweeps to catch entities moved post-spawn (water, pistons, minecarts, leads, boats, etc.). - Removal is safe and batched to avoid lag spikes. Limits apply per chunk to prevent dense stacks.
    Example — How It Works
    1) Example configuration (YAML-style, adapt to your config format):
    entity-limiter:
      enabled: true
      check-interval-ticks: 200   # every 10 seconds
      notify:
        enabled: true
        permission: clearlagenhanced.limiter.notify
        cooldown-seconds: 60
      selection-policy: OLDEST     # OLDEST | FURTHEST | RANDOM
      limits:
        ARMOR_STAND: 12
        BOAT: 8
        MINECART: 16
      worlds:
        include: ["survival", "skyblock"]
        exclude: []
      bypass-permission: clearlagenhanced.limiter.bypass
    2) In-game scenario: - A player sets up a water stream that pushes 30 armor stands into a single chunk. - On the next sweep (or when the chunk loads), the plugin detects 30 ARMOR_STAND in that chunk where the limit is 12. - The plugin removes 18 excess armor stands using the OLDEST policy. - Staff online with clearlagenhanced.limiter.notify see: "[ClearLaggEnhanced] Chunk x=120,z=45 (survival): removed 18 excess ARMOR_STAND (limit=12)." - Console logs the same event (optional), and further alerts for this chunk are suppressed for the configured cooldown period to prevent spam.
    Notes
    - If you already use other limiters (mobs, spawners, hoppers, redstone), this feature operates independently and complements them. - Recommended: tune limits conservatively at first; then adjust based on typical player builds. - Consider granting the bypass permission to trusted builders to avoid accidental cleanup during creative projects. --- #### Added - Hopper limiter: Cached per-chunk hopper counts to enable soft-cap–based cooldown scaling. - New concurrent cache: hopperCountByChunk keyed as "world:x,z". - Lazy initialization: If a loaded chunk has no cache entry at use time, it’s scanned and cached. - Event-driven updates: - ChunkLoadEvent: scan and seed cache. - ChunkUnloadEvent: remove cache and related per-chunk tick maps to prevent leaks. - BlockPlaceEvent (HOPPER): increment chunk count. - BlockBreakEvent (HOPPER): decrement chunk count (floors at 0). - Debug messaging for throttling per chunk uses the existing key debug.hopper.throttling from messages.yml (rate limited to once per 100 ticks per chunk). #### Changed - Hopper cooldown computation now properly applies the soft cap: - Base cooldown: lag-prevention.hopper-limiter.transfer-cooldown ticks (min 1). - If hopper count in the chunk > max-hoppers-per-chunk, effective cooldown increases by 2 * (excess) ticks. - The count method is now cache-backed: - countHoppersInChunkCached(Chunk) returns the cached number, performs a synchronous scan if necessary for loaded chunks, and returns 0 for unloaded chunks (no forced chunk loads). #### Fixed - Soft-cap effect was previously ineffective because hopper counts always returned 0; now it reflects real counts and increases cooldown in hopper-dense chunks. #### Performance/Memory - Event-driven cache maintenance avoids per-tick scanning. - Lazy scan only occurs on first access for loaded chunks without a cache entry. - Cleanup on ChunkUnloadEvent prevents memory leaks by removing: - hopperCountByChunk, lastMoveTickByChunk, lastLogTickByChunk entries for the chunk. #### Compatibility - Java 17+, Spigot/Paper 1.17+ APIs. - No changes to permissions, commands, or message keys. - Configuration keys reused: - lag-prevention.hopper-limiter.enabled - lag-prevention.hopper-limiter.transfer-cooldown - lag-prevention.hopper-limiter.max-hoppers-per-chunk - debug ---
    How to test the new hopper limiter behavior
    #### 1) Build and install - Build the plugin (build completed successfully during this session). - Place the generated JAR into your server’s plugins folder. - Start the server. #### 2) Configure In plugins/ClearLaggEnhanced/config.yml: - Ensure hopper limiter is enabled: - lag-prevention.hopper-limiter.enabled: true - Set a visible base cooldown (example): - lag-prevention.hopper-limiter.transfer-cooldown: 8 - Set a testable soft cap (example): - lag-prevention.hopper-limiter.max-hoppers-per-chunk: 5 - Optional: enable debug to see rate-limited throttling notices: - debug: true Reload: - /lagg reload (or restart the server). #### 3) Baseline verification (≤ cap) - In a single chunk, place 5 hoppers (equal to the configured cap). - Set up a simple hopper-to-chest item transfer. - Observe transfers occur at the base cooldown (8 ticks in the example). - With debug on, you should not see persistent throttling logs for this chunk. #### 4) Soft-cap scaling (> cap) - Increase hoppers in the same chunk to 8 (3 above cap). - Expected effective cooldown: base + (2 * excess) = 8 + (2*3) = 14 ticks. - Observe that transfers are slower (roughly 75% speed of baseline). - With debug enabled, you should periodically see: - debug.hopper.throttling once per ~100 ticks per chunk (rate-limited). - Reduce back to 5 hoppers; transfers should return to the base rate on the next allowed move. #### 5) Event-driven cache updates - Block place: - Place a hopper in the test chunk and confirm the slowdown increases immediately (no server reload). - Block break: - Break a hopper and confirm slowdown decreases accordingly (no server reload). - Chunk load: - Move far enough away (or use a second account) so the test chunk unloads, then return to load it. - On reload, behavior should match the current in-world number of hoppers (cache is reseeded). - Chunk unload: - Move away to unload the chunk; ensure no debug spam continues for that chunk; upon coming back, the count re-initializes and matches reality. #### 6) Unloaded chunk behavior - Ensure no chunk forcing: - When a chunk is unloaded, the system treats the count as 0 (no extra cooldown added due to unknown state). - This minimizes false throttling for inactive areas. #### 7) Stress/regression checks - Place 30+ hoppers in a single chunk and verify transfers are heavily throttled without server lag spikes. - Verify other systems remain unaffected: - Entity clear com
    412 downloads
  34. 1.2-BetaClearLaggEnhanced 1.2-BetaAug 20, 2025
    Implement advanced throttling features for lag prevention: - Add HopperLimiterListener to throttle hopper activity. - Add MobLimiterListener to control mob spawning per chunk. - Add RedstoneLimiterListener to enforce redstone activity limits. - Add SpawnerLimiterListener to slow down spawners and cap spawn rates. - Extend LagPreventionManager to support entity optimization and limit enforcement.
    81 downloads

Similar projects

Plugin →