As your Minecraft server grows, hundreds of dropped ground items (from mob farms, mining trips, and player deaths) and excess entity spawns can cause server performance to degrade. ClearLag is one of the most popular utility plugins for managing server entities, sweeping ground clutter, and monitoring server TPS (Ticks Per Second).
This guide will show you how to install ClearLag using the Cubes Hosting Game Panel, configure item whitelists, and run maintenance commands.
Step 1: Install ClearLag via the Cubes Panel
- Log in to your Cubes Hosting Game Panel and select your server.
- Go to Tools > Plugin & Mod Installer on the left menu.
- Search for ClearLag (or Clearlag).
- Click Install.
- Go to your server Console and click Restart.
Step 2: Essential ClearLag Commands
Once installed, operators (OPs) can execute /lagg commands in-game or directly from the console:
| Command | Description |
|---|---|
/lagg | Displays the main ClearLag command menu and active status. |
/lagg check | Displays current server TPS, total loaded entities, and RAM usage. |
/lagg clear | Manually clears all dropped items currently lying on the ground. |
/lagg killmobs | Clears hostiles/animals to immediately relieve CPU load during entity lag spikes. |
/lagg unloadchunks | Unloads inactive chunks to free up server memory. |
/lagg area <radius> | Clears entities and items in a specific block radius around you. |
/lagg reload | Reloads the config.yml configuration file after making changes. |
Step 3: Configuring config.yml & Item Whitelists
By default, ClearLag will periodically sweep all ground items every few minutes. However, you should customize your configuration to protect valuable items (like Netherite armor, Shulker Boxes, and Diamonds) from getting accidentally deleted during a sweep.
- Open your Game Panel File Manager.
- Navigate to:
/plugins/ClearLag/config.yml - Open
config.ymlfor editing.
1. Protect Valuable Items (Item Whitelist)
Scroll down to the item-clear.whitelist: section. Add any valuable items that ClearLag should never delete during an item sweep:
item-clear:
whitelist:
- DIAMOND
- DIAMOND_SWORD
- DIAMOND_HELMET
- DIAMOND_CHESTPLATE
- DIAMOND_LEGGINGS
- DIAMOND_BOOTS
- NETHERITE_INGOT
- NETHERITE_SWORD
- NETHERITE_HELMET
- NETHERITE_CHESTPLATE
- NETHERITE_LEGGINGS
- NETHERITE_BOOTS
- SHULKER_BOX
- BEACON
2. Adjust Sweep Warnings and Timing
Find the auto-removal: section to customize how often sweeps happen and what warning messages are broadcast to players:
auto-removal:
autoclear-interval: 300 # Sweep every 300 seconds (5 minutes)
warnings:
- "time:60 msg:&4[ClearLag] &cWarning! Ground items will be cleared in &760 &cseconds!"
- "time:10 msg:&4[ClearLag] &cWarning! Ground items will be cleared in &710 &cseconds!"
- Save the file and run
/lagg reloadin-game or in the console.
Pro-Tip for Modern PaperMC Servers
While ClearLag is a fantastic tool for manually checking TPS (/lagg check) and running emergency entity purges, modern PaperMC and Purpur servers natively manage item despawns and entity activation ranges in paper.yml.
If you run high-player PaperMC servers, combine ClearLag with our View and Simulation Distance Optimization Guide for maximum performance!
Conclusion
ClearLag is a reliable, lightweight tool for maintaining high TPS on your server. Install it via Tools > Plugin Installer, configure your item whitelist to protect valuable loot, and keep your server running lag-free!
