Quick Start

Get up and running with ClearLaggEnhanced in just a few minutes.

Installation

  1. Download the plugin from Modrinth
  2. Place in your plugins folder
  3. Restart your server
  4. Configuration files are automatically generated

See Full Installation Guide for details.

Your First Configuration

Step 1: Test Entity Clearing

By default, entity clearing runs every 5 minutes (300 seconds). Test it manually:

/lagg clear

This immediately clears entities. Watch the console to see what was removed.

Step 2: Check Next Clear Time

See when the next automatic clear will happen:

/lagg next

Players will see a message like: "Next automatic clear in 4 minutes and 32 seconds"

Step 3: Monitor Performance

Check your server's TPS:

/lagg tps

This shows:

  • Current TPS (color-coded)
  • Average TPS over different intervals
  • Real-time performance status

Step 4: Open Admin GUI

For a visual overview:

/lagg admin

The GUI shows:

  • All enabled modules
  • Current performance stats
  • Quick access to module configurations

Basic Configuration

Entity Clearing Settings

Edit module/entity-clearing/config.yml:

enabled: true
interval: 300              # Clear every 5 minutes
protect-named-entities: true
protect-tamed-entities: true

Common adjustments:

  • Smaller servers (1-20 players): interval: 600 (10 minutes)
  • Medium servers (20-100 players): interval: 300 (5 minutes)
  • Large servers (100+ players): interval: 180 (3 minutes)

Enable Lag Prevention

Enable mob limiting in module/mob-limiter/config.yml:

enabled: true
max-mobs-per-chunk: 50    # Adjust based on server size

Recommended values:

  • Small servers: 75
  • Medium servers: 50
  • Large servers: 35

Customize Notifications

Edit notification settings in module/entity-clearing/config.yml:

notifications:
  broadcast-times: [60, 30, 10, 5]  # Warnings at these seconds
  types:
    - "ACTION_BAR"                  # Display above hotbar
  sound:
    enabled: true
    name: "BLOCK_NOTE_BLOCK_PLING"

Essential Commands

Command What It Does When to Use
/lagg clear Clears entities immediately Testing, emergency lag spikes
/lagg next Shows countdown to next clear Let players know when it clears
/lagg tps Shows server TPS Check performance
/lagg admin Opens admin GUI Visual configuration
/lagg reload Reloads configuration After changing configs

Testing Your Setup

Test 1: Entity Clearing

  1. Spawn lots of items: /give @p stone 64 and drop them
  2. Run /lagg clear
  3. Check console: "Cleared X entities in Y ms"
  4. Items should disappear

Test 2: Protected Entities

  1. Name a mob: Use a name tag
  2. Run /lagg clear
  3. Named mob should NOT be cleared

Test 3: Mob Limiting

  1. Enable mob limiter
  2. Run /lagg reload
  3. Try to spawn 60 mobs in one chunk
  4. Only 50 should spawn (based on max-mobs-per-chunk: 50)

Test 4: Performance Monitoring

  1. Run /lagg tps
  2. Should show green (20.0 TPS) if server is healthy
  3. Run /lagg ram
  4. Shows memory usage

Common First-Time Adjustments

Entities Not Clearing

Check the whitelist in module/entity-clearing/config.yml:

whitelist:
  - "VILLAGER"
  - "ARMOR_STAND"
  - "ITEM_FRAME"
  # Remove entities you want to clear

Common entities to add:

  • DROPPED_ITEM - Never clear dropped items (not recommended)
  • EXPERIENCE_ORB - Never clear XP orbs

Common entities to remove:

  • Remove ARMOR_STAND if you want to clear them
  • Remove ITEM_FRAME if you have too many

Too Aggressive Clearing

Increase interval:

interval: 600    # Clear every 10 minutes instead of 5

Protect more entities:

protect-named-entities: true
protect-tamed-entities: true
extra-protections:
  mobs-in-boats: true
  mobs-from-breeding: true

Not Aggressive Enough

Decrease interval:

interval: 180    # Clear every 3 minutes

Reduce whitelist:

  • Remove entities that don't need protection

Enable all modules:

modules:
  entity-clearing: true
  mob-limiter: true
  spawner-limiter: true
  misc-entity-limiter: true

Performance by Server Size

Small Servers (1-20 Players)

entity-clearing:
  interval: 600                # 10 minutes

mob-limiter:
  max-mobs-per-chunk: 75

Reason: Less frequent clearing is fine with fewer players.

Medium Servers (20-100 Players)

entity-clearing:
  interval: 300                # 5 minutes

mob-limiter:
  max-mobs-per-chunk: 50
  per-type-limits:
    enabled: true

Reason: Balanced clearing with per-type limits.

Large Servers (100+ Players)

entity-clearing:
  interval: 180                # 3 minutes

mob-limiter:
  max-mobs-per-chunk: 35
  per-type-limits:
    enabled: true

misc-entity-limiter:
  enabled: true
  limits-per-chunk:
    ARMOR_STAND: 3
    ITEM_FRAME: 3

Reason: Aggressive clearing with all modules enabled.

Next Steps

Now that you're up and running:

  1. Explore modules - Entity Clearing, Mob Limiter
  2. Customize messages - Message Configuration
  3. Optimize settings - Performance Optimization
  4. Learn advanced features - Chunk Finder