Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for LucasTHCR

Full control over entity, spawner, TNT and redstone lag. Every limiter, threshold and message configurable.

Report ClearLAGGG?

Discord Release Downloads Servers License

Built with Java 21 Available for Paper Available for Purpur Available for Spigot Available for Bukkit

Chat with us on Discord Available on Codeberg

bStats

Prevention, not brute force.

Full control over every source of entity, spawner, TNT and redstone lag on your server. Lightweight, fully configurable down to the last message, and built to disappear from your timings report.


Features

Feature Description
Entity Clearing Scheduled or on-demand clears, per-entity-type, with named/leashed/tamed protection.
Mob Killing Separate configurable kill-list, independent from the entity clearer.
Per-chunk Entity Limiter Hard caps per entity type, enforced live before they ever pile up.
Mob Spawner Limiter Caps spawners within a radius, force-sets delay & activation range.
Mob Egg Limiter Per-player, per-world cooldown-based cap on spawn-egg usage.
Breeding Limiter Caps breedable animals per chunk to stop farm-lag before it starts.
Per-item Live-time Custom despawn timers per material, so you keep valuables, clear junk faster.
Protected Drops Renamed items, enchanted items and any materials you list survive the entity clear.
Countdown Boss Bar Optional boss bar that runs down to the automatic clear, next to the chat warning.
TNT Lag Reduction Caps primed TNT per chunk, limits chain reactions, trims oversized explosions.
Hopper & Redstone Limiters Per-chunk caps on hopper transfers and redstone activity.
AI Limiter Reduces pathfinding/AI cost for mobs far from any player.
TPS/RAM Meter Background monitor that can execute commands when thresholds are crossed.
Full-tick Sampler Samples raw tick durations and flags spikes.
Memory Sampler & Profiler Heap-over-time sampling plus a lightweight chunk-activity profiler.
Halt Mode Temporarily suspends mob spawning, hopper transfer, redstone, fluid flow or item merging.
Module Admin Enable/disable every module live via command, no restart needed.
Destructive-command Confirmation Clear/killmobs/area/unloadchunks require a confirming second run.
PlaceholderAPI Support 10 placeholders for TPS, RAM, entity counts and halt state.
12 Languages Fully translatable, with automatic fallback to English for missing keys.
Everything's configurable Every message, threshold, limit and interval lives in config.yml.

Dependencies


How It Works

ClearLAGGG doesn't wait for your server to already be lagging. Every limiter runs at the point of creation: a spawner placement, a bred animal, a primed TNT, a spawned item. If it would exceed your configured limit, it's stopped or removed immediately, instead of building up until a scheduled clear has to nuke half your world's entities at once.

On top of that, a periodic scan sweeps loaded chunks for the entity-limiter and refreshes "never despawn" items, while the TPS/RAM meter watches server health continuously and can fire your own console commands the moment a threshold is crossed, including running /lagg clear automatically under critical load.

Halt mode gives you an emergency lever: instantly suspend the systems you choose (mob spawning, hopper transfer, redstone, fluid flow, item merging) with one command, and resume just as fast.


Configuration

Every module can be switched off on its own, and nothing here is required to get the plugin running - the defaults are safe.

The listing below shows the layout only. The same file with every option documented in place ships inside the jar and can be read at config.yml on Codeberg.

settings:
  prefix: "&8[&bClearLAGGG&8] &7"
  clean-logs-on-startup:
    enabled: false
    older-than-days: 14
  language: "english"
  startup-banner: true
  check-for-updates: true
  update-check-interval-minutes: 30

placeholderapi:
  enabled: true
  auto-clear-on-placeholder-request:
    enabled: false
    trigger-placeholder: "clearlaggg_autoclear"
    cooldown-seconds: 300

entity-clear:
  enabled: true
  auto-clear-interval: 600
  warn-before-clear:
    enabled: true
    warn-seconds-before: 10
    bossbar: false
  broadcast-min-amount: 1
  excluded-worlds: []
  entities:
    DROPPED_ITEM: true
    ARROW: true
    EXPERIENCE_ORB: false
    ITEM_FRAME: false
    ARMOR_STAND: false
    BOAT: false
    MINECART: false
    EGG: true
    SNOWBALL: true
    FIREBALL: true
    SPLASH_POTION: true
    TRIDENT: true
    FISHING_BOBBER: true
  ignore-named-entities: true
  ignore-leashed-entities: true
  ignore-tamed-entities: true
  protect-items:
    named: true
    enchanted: false
    materials: []

kill-mobs:
  enabled: true
  auto-kill-interval: 0
  excluded-worlds: []
  ignore-named-entities: true
  ignore-tamed-entities: true
  ignore-leashed-entities: true
  mobs:
    ZOMBIE: true
    SKELETON: true
    SPIDER: true
    CREEPER: true
    ENDERMAN: true
    WITCH: true
    SLIME: true
    PHANTOM: true
    DROWNED: true
    HUSK: true
    STRAY: true
    PILLAGER: true
    VINDICATOR: true
    EVOKER: true
    RAVAGER: true
    COW: false
    PIG: false
    SHEEP: false
    CHICKEN: false
    VILLAGER: false
    WOLF: false
    CAT: false
    HORSE: false

limiters:
  enabled: true
  scan-interval-ticks: 100

  entity-limiter:
    enabled: true
    per-chunk-limits:
      DROPPED_ITEM: 40
      ARROW: 20
      BOAT: 4
      MINECART: 4
      ITEM_FRAME: 30
      ARMOR_STAND: 15
      EXPERIENCE_ORB: 60
    default-limit: -1

  mob-limiter:
    enabled: true
    per-chunk-limit: 25
    per-world-limit: 0
    prevent-spawns-at-limit: true

  hopper-limiter:
    enabled: false
    per-chunk-limit: 8

  redstone-limiter:
    enabled: false
    per-chunk-limit: 200

spawner-limiter:
  enabled: true
  max-spawners-per-radius: 4
  radius: 16
  action-on-exceed: "PREVENT_PLACE"
  force-spawn-delay: 0
  max-activation-range: 16

mob-egg-limiter:
  enabled: true
  max-per-player: 10
  cooldown-seconds: 60
  world-overrides: {}

breeding-limiter:
  enabled: true
  max-per-chunk: 30
  applies-to: []

item-livetime:
  enabled: true
  default-seconds: 300
  overrides:
    DIAMOND: 600
    NETHERITE_INGOT: -1
    NETHERITE_SCRAP: -1
    TOTEM_OF_UNDYING: -1
    ELYTRA: -1
    ENCHANTED_BOOK: 450
    EMERALD: 450
    NETHER_STAR: -1
    DRAGON_EGG: -1

tnt:
  enabled: true
  max-primed-per-chunk: 25
  chain-reaction-radius-limit: 0
  merge-explosions: true
  merge-radius: 1.0
  max-blocks-per-explosion: 500
  disable-block-damage: false
  fast-explosion-calculation: true

chunk-analysis:
  enabled: true
  results-per-page: 10
  score-weights:
    entity: 1.0
    tile-entity: 1.5
    hopper: 2.0
    redstone: 1.2

chunk-unloader:
  enabled: true
  auto-unload-interval: 0
  player-safe-radius: 4

ai-limiter:
  enabled: false
  disable-ai-beyond-blocks: 48
  freeze-beyond-blocks: 0
  ai-tick-rate-divisor: 1

tps-meter:
  enabled: true
  check-interval-seconds: 10
  triggers:
    - name: "high-ram-usage"
      enabled: false
      condition: "RAM_ABOVE_PERCENT"
      value: 90.0
      commands:
        - "say [ClearLAGGG] RAM usage high: {ram_percent}%"
      cooldown-seconds: 300

tick-sampler:
  enabled: true
  max-sample-ticks: 12000
  spike-threshold-ms: 50.0

memory-sampler:
  enabled: true
  max-sample-seconds: 600
  samples-per-second: 2

profiler:
  enabled: true
  max-profile-seconds: 300
  types:
    - "redstone"
    - "entities"
    - "tile-entities"
    - "chunk-loads"

halt:
  enabled: true
  disable:
    mob-spawning: true
    item-merging: false
    redstone: false
    fluid-flow: false
    hopper-transfer: true

commands:
  confirm-destructive-commands: true
  confirmation-window-seconds: 10
  destructive-commands:
    - "clear"
    - "killmobs"
    - "area"
    - "unloadchunks"

profiles: {}

config-version: 1

Commands

Command Permission Default
/lagg clear lagg.clear OP
/lagg check [world1, world2...] lagg.check OP
/lagg reload lagg.reload OP
/lagg killmobs lagg.killmobs OP
/lagg area <radius> lagg.area OP
/lagg tpchunk <x> <z> [world] lagg.tpchunk OP
/lagg admin <list|enable|disable> [module] lagg.admin OP
/lagg tps lagg.tps OP
/lagg halt lagg.halt OP
/lagg sampleMemory <seconds> lagg.samplememory OP
/lagg sampleTicks <ticks> [raw] lagg.sampleticks OP
/lagg unloadchunks lagg.unloadchunks OP
/lagg profile <seconds> <type> lagg.profile OP
/lagg memory lagg.memory OP
/lagg performance lagg.performance OP
(none) lagg.notify OP, receives threshold notifications

Placeholders

Requires PlaceholderAPI to be installed.

Placeholder Description
%clearlaggg_tps% Current estimated TPS
%clearlaggg_tps_colored% TPS with a color code based on health
%clearlaggg_ram_used% Used RAM in MB
%clearlaggg_ram_max% Max RAM in MB
%clearlaggg_ram_percent% Used RAM as a percentage
%clearlaggg_entities_world% Live entity count in the player's world
%clearlaggg_entities_total% Live entity count across all worlds
%clearlaggg_chunks_loaded% Loaded chunk count in the player's world
%clearlaggg_last_clear_amount% Amount removed by the last /lagg clear
%clearlaggg_halted% true/false whether halt mode is active

Credits

LucasTHCR Creator & maintainer

Discord: dc.gg/paperstream

Information

Category
Admin Tools
Published
August 7, 2026
License
82Downloads
0Stars

Pinned Versions

Members

1