Keep Your Minecraft Server Smooth! 🚀
This mod automatically cleans up entities on your Minecraft server to prevent lag. It does this at regular intervals that you can configure. You can also enable/disable and reset the timer with a command.
⚙️ How does it work?
The "Custom Clear Lag" mod works in the background on your server. Here are the key steps:
clear_lag.json is created in the config/oas_work/ folder.clear_lag.json file to find out:time: After how many minutes the cleanup should be performed (default is 5 minutes).command: Which command should be executed for the cleanup (default is kill @e which kills all entities, be careful!).🎮 How to use it?
**🛠️ Configuration (optional but **recommended):
config/oas_work/ folder of your server and open the clear_lag.json file with a text editor."time": 5, Change 5 to the desired number of minutes between each cleanup (e.g., 10 for 10 minutes)."command": "kill @e" ⚠️ VERY IMPORTANT: The default command kill @e kills ALL entities (items on the ground, animals, players…). You MUST change it to a more targeted cleanup command. For example:"/kill @e[type=!minecraft:player,distance=500]" (Kills all entities except players, more than 500 blocks away - adapt to your server)./minecraft:kill @e[type=!player,tag=!keep] (Requires tags to protect certain entities, more advanced).clear_lag.json file. 🔄 Changes are applied immediately, no server restart needed!🕹️ In-game commands (for server operators):
Open the server console or the in-game chat (if you are an operator) and use the command: /cclearlag
/cclearlag stop <true/false> :
/cclearlag stop true 🛑 Stops automatic cleanup./cclearlag stop false ✅ Reactivates automatic cleanup./cclearlag reset <true/false> or /cclearlag reset :
true/false argument has no effect here, only reset matters.📌 Important Points:
/cclearlag command.kill @e command in clear_lag.json! Use a more suitable command for your server to avoid deleting important entities (players, tamed animals, etc.).clear_lag.json file are applied immediately, without restarting the server.