Entity Filters and Secondary Tasks
The X-ClearLag tasks engine allows you to run multiple independent tasks at different time intervals. Each task has its own cleanup filters.
Independent Tasks
You can have a task that clears monsters every 5 minutes, and another that simply announces βcleanupβ without clearing anything or that saves the worlds every 30 minutes.
tasks:
clearlag:
interval: 300
remove-drops: true
entities:
- ZOMBIE
- CREEPER
save_world:
interval: 1800
remove-drops: false # Does not clear items from the floor
entities: [] # Does not clear any entity
commands:
- "save-all"π‘οΈ Filters and Whitelists
The biggest problem with generic cleanup plugins is that they clear pets, custom villagers, or important farm mobs. X-ClearLag addresses this with three security systems:
1. Named Entities (protect-named)
If a player uses a Name Tag on a Zombie, this zombie no longer counts as a common zombie. If protect-named: true is enabled, X-ClearLag will ignore this zombie and will not clear it, allowing players to keep their captured monsters.
2. Leashed Entities (protect-leashed)
If protect-leashed: true is active, any animal or monster that is currently leashed by a player or to a fence will be completely protected from cleanup.
3. Species Whitelist (protected-entities)
Sometimes you donβt want to clear certain entities no matter what.
entities:
- ARROW
- ZOMBIE
protected-entities:
- PLAYER
- VILLAGER
- ARMOR_STANDEven if you accidentally added VILLAGER to the clear list (entities), the protected-entities list has absolute priority. It works as error-proof insurance to prevent catastrophes on your server.
Armor Stand Tip: Make sure ARMOR_STAND is always in the protected-entities list. Many plugins (like holograms and furniture) use invisible Armor Stands that would break if cleared.