Skip to main content

Overview

SigmaClearLag is a lightweight, Folia-compatible entity cleanup plugin. It periodically sweeps the world for items, XP orbs, excess mobs, and vehicles โ€” reducing entity count to keep your server's TPS healthy. It protects named mobs, tamed animals, villagers, and high-value items throughout the process.

Why Use SigmaClearLag?โ€‹

Entity accumulation is one of the primary causes of TPS drops on survival and SMP servers. SigmaClearLag automates cleanup on a schedule with configurable warnings, so players always have advance notice and no important entities are lost.

Key Featuresโ€‹

  • Scheduled Cleanup โ€” Configurable interval (default 5 min) with multi-stage warnings
  • Smart Entity Protection โ€” Named, tamed, leashed, ridden, and villager entities are always preserved
  • Item Whitelist โ€” High-value items (Elytra, Netherite, etc.) are never cleared
  • Per-Chunk Mob Caps โ€” Species-level limits enforced per chunk during sweeps
  • Global Entity Caps โ€” Server-wide caps per mob type regardless of chunk limits
  • Manual Clear โ€” Admins can trigger an immediate cleanup with /lag clear
  • Live Stats โ€” /lag info shows time until next clear and recent cleanup counts
  • PlaceholderAPI โ€” Countdown timer available as a placeholder
  • Folia Compatible โ€” Uses RegionScheduler and AsyncScheduler

Supported Versionsโ€‹

ComponentRequirement
MinecraftPaper/Spigot 1.21+
JavaJava 21+
API Version1.21
FoliaSupported

Dependenciesโ€‹

PluginTypePurpose
PlaceholderAPIOptional%sigmaclearlag_countdown% placeholder

Quick Exampleโ€‹

# See when the next clear fires
/lag info

# Trigger an immediate clear (admin)
/lag clear

# Reload configuration
/lag reload

How It Worksโ€‹

  1. A scheduled timer counts down from schedule-interval seconds
  2. Warning messages are sent at each configured threshold (e.g. 60 s, 30 s, 10 s, 5 s)
  3. At zero, the plugin iterates all loaded chunks and:
    • Removes dropped items (except whitelisted ones)
    • Removes XP orbs and non-whitelisted projectiles
    • Enforces per-chunk mob limits (removing lowest-priority mobs first)
    • Enforces global mob caps
    • Removes excess minecarts / vehicles
  4. Protected entities (named, tamed, leashed, ridden) are never touched

What's Next?โ€‹