How to Install and Configure ClearLagg on Your Minecraft Server
Install ClearLagg to auto-clear ground items and entities on your Minecraft Java server, reducing entity lag and improving TPS.
ClearLagg is the most-installed entity-cleanup plugin for Minecraft. It periodically removes ground items (dropped items, XP orbs, projectiles), caps entity counts, and provides commands for emergency cleanup. Combined with mob-spawn limits and view-distance tuning, it's one of the highest-impact lag fixes for survival servers.
Note: The plugin is officially named ClearLagg (two g's). Some older guides spell it ClearLag.
Why ClearLagg Matters
Dropped items don't despawn for 5 minutes by default. On a busy server with mob farms, item sorters, or active mining, ground items pile up into the thousands within minutes — and every single one gets ticked every game tick.
| Entity type | Default tick cost | Common volume |
|---|---|---|
| Dropped item | Low individually, deadly in bulk | Mob farms produce 100s/minute |
| XP orb | Same | Same |
| Arrow | Low | Skeleton spawners produce constantly |
| Falling block | Medium | TNT explosions, sand farms |
A single mob farm can drop TPS from 20 to 14 with just ground item accumulation. ClearLagg fixes this with one config.
Install ClearLagg
Download ClearLagg
Get the latest from SpigotMC. Compatible with Bukkit, Spigot, Paper, Purpur, and Folia.
Stop the server
In the XGamingServer Panel, open Console and stop your server.
Upload to plugins/
Click Files in the sidebar and upload ClearLagg.jar to plugins/.
Start the server
Start from Console. ClearLagg generates plugins/ClearLagg/config.yml on first run.
Verify it loaded
pluginsClearLagg should appear in green. Test:
lagg checkOutput shows current entity counts.
Recommended Configuration
The defaults are reasonable, but here's a tuned setup for most survival servers. Edit plugins/ClearLagg/config.yml:
Auto-Clear Ground Items
auto-removal:
enabled: true
interval: 300 # 5 minutes between clears
warning:
enabled: true
seconds-before: 60 # First warning at T-60s
extra-warnings: [30, 10, 5, 3, 2, 1]
message: "&6[ClearLagg] &eGround items will be removed in &c%seconds% &eseconds!"
broadcast-message: "&6[ClearLagg] &eRemoved &c%amount% &eground items"Entity Limits
limit:
enabled: true
per-chunk:
item: 64
arrow: 32
experience_orb: 32
item_frame: 16
armor_stand: 16This caps how many of each entity type can exist per chunk. Excess entities are auto-removed.
What to Clear
auto-removal:
filter:
item: true
experience_orb: true
arrow: true
snowball: true
egg: true
splash_potion: true
item_frame: false # Don't clear item frames!
armor_stand: false # Don't clear armor stands!
boat: false
minecart: falseCritical: Always set
item_frame: falseandarmor_stand: false. Players use these for builds and decorations — clearing them is destructive.
Item Merge
merge:
enabled: true
radius: 3.0
merge-on-pickup: trueMerges nearby item stacks to reduce entity count without losing items.
Commands
| Command | Permission | Description |
|---|---|---|
/lagg check | clearlagg.check | Show current entity counts per type |
/lagg clear | clearlagg.clear | Manually clear ground items now |
/lagg area <radius> | clearlagg.area | Clear entities within radius |
/lagg killmobs | clearlagg.killmobs | Kill all hostile mobs |
/lagg unloadchunks | clearlagg.unload | Unload non-essential chunks |
/lagg gc | clearlagg.gc | Trigger Java garbage collection |
/lagg halt | clearlagg.halt | Pause all entity spawning temporarily |
/lagg reload | clearlagg.reload | Reload config |
Don't grant
/laggperms to regular players. Use it as an admin tool.
Tuning Tips
| Server type | Recommended interval |
|---|---|
| Survival, ~10 players | 600 (10 min) |
| Survival, ~30 players | 300 (5 min) |
| Skyblock / island | 180 (3 min) |
| Anarchy / mob farms | 120 (2 min) |
| Build / creative | 1800 (30 min) — items are rare |
| Minigame lobby | 60 (1 min) |
Lower interval = more frequent cleanup = better TPS but more "items vanishing" complaints. Find the balance for your community.
What ClearLagg Does NOT Do
| Misconception | Reality |
|---|---|
| "ClearLagg fixes all lag" | It only fixes entity lag — not redstone, chunk gen, plugin lag |
| "It clears player inventories" | Never — only ground entities |
| "It clears chest contents" | Never — only entities, never blocks |
| "It removes mob farms" | No — but it removes the dropped items the farm produces |
| "It improves chunk generation" | No — use Chunky for that |
For chunk and tick lag, install Spark and read Optimize Server.
Combined Performance Stack
ClearLagg works best as part of a complete optimization setup:
- ClearLagg — auto-clear ground items
- FarmControl — cap mob farms
- Spark — find lag sources
- Chunky — pre-generate world
- Aikar's Flags — tune JVM
- Lower view-distance — reduce tick load
Common Issues
| Problem | Fix |
|---|---|
| Players complain "my items disappeared" | Lower clear frequency or increase warning time |
| Item frames cleared by mistake | Set item_frame: false in filter |
| Armor stands disappeared | Set armor_stand: false in filter |
| Entity limits too low | Raise per-chunk caps in limit: section |
| Plugin doesn't load | Wrong server type — Bukkit/Spigot/Paper only |
| Lag continues after install | ClearLagg only fixes entity lag — profile with Spark |
| Vehicles cleared | Set boat: false and minecart: false |
Common Mistakes
| Mistake | Fix |
|---|---|
| Clearing item frames or armor stands | Always exclude from filter |
| Setting interval too low (e.g., 30s) | Players hate it — keep at 120+ |
| Disabling warnings | Always warn — players need time to pick up items |
Granting /lagg to all players | Restrict to admin |
| Expecting ClearLagg to solve TPS issues from plugins/redstone | Use Spark to find the real cause |
| Not using merge feature | Item merging reduces entity count cheaply |
Related Guides
How is this guide?

How to Set Up BungeeGuard on Your Minecraft BungeeCord Network
Install BungeeGuard on your BungeeCord proxy and backend Minecraft Java servers to prevent unauthorized direct backend connections and UUID spoofing.
How to Set Up DiscordSRV on Your Minecraft Server
Install DiscordSRV to bridge your Minecraft Java server chat with a Discord channel — bot setup, channel ID, console mirroring, and account linking.