LagOptimizer icon

LagOptimizer -----

A comprehensive lag mitigation and analysis solution for Minecraft servers



A comprehensive lag mitigation and performance analysis plugin for Spigot/Paper
LagOptimizer
A comprehensive lag mitigation and performance analysis plugin for Spigot/Paper

LagOptimizer keeps your server smooth by automatically purging problematic entities, monitoring performance, and giving admins tools to diagnose and fix lag quickly.

  • Smart Entity Purge – configurable interval, whitelist/blacklist, player-safe distance
  • Performance Monitoring – TPS, memory, entity/chunk/player counters with live GUI metrics
  • Scoreboard Overlay – optional, fully configurable with real-time updates
  • Interactive GUI Management – comprehensive in-game interface for all features
  • Whitelist/Blacklist Editors – paginated GUI editors with instant config persistence
  • Advanced Chunk Management – Paper API integration with safe-chunk filtering
  • Spark Integration – direct profiler and health report integration
  • Clearlag-Style Commands – full command suite for server management

Code (Text):

/lagoptimize gui                             - Open interactive management GUI
/lagoptimize purge [entityType]              - Purge entities now
/lagoptimize reload                          - Reload configuration
/lagoptimize stats                           - Display performance stats
/lagoptimize toggle                          - Toggle automatic purging
/lagoptimize info                            - Plugin info + runtime state
/lagoptimize config <setting> [value]        - View/modify settings
/lagoptimize version                         - Show plugin version
/lagoptimize help                            - Show help

# Advanced Commands
/lagoptimize tps                             - Display current TPS
/lagoptimize memory                          - Show memory usage
/lagoptimize gc                              - Request garbage collection
/lagoptimize chunk                           - Chunk analysis
/lagoptimize unloadchunks                    - Unload inactive chunks (Paper API)
/lagoptimize killmobs [radius]               - Remove mobs (optionally within radius)
/lagoptimize tpchunk <x> <z> [world]         - Teleport to chunk center
/lagoptimize halt                            - Broadcast halt notice
/lagoptimize samplememory                    - Memory sampling with GC
/lagoptimize sampleticks                     - Tick sampling
/lagoptimize profile                         - Start Spark profiler (if available)
/lagoptimize performance                     - Spark health report (if available)
 

Code (Text):

lagoptimizer.*            - All permissions
lagoptimizer.use          - Use base command
lagoptimizer.purge        - Use purge
lagoptimizer.reload       - Reload config
lagoptimizer.stats        - View stats
lagoptimizer.toggle       - Toggle auto-purge
lagoptimizer.info         - View plugin information
lagoptimizer.config       - View/modify config
lagoptimizer.help         - View help
lagoptimizer.version      - View version
lagoptimizer.gui          - Open management GUI
lagoptimizer.tps          - View TPS
lagoptimizer.memory       - View memory usage
lagoptimizer.gc           - Request garbage collection
lagoptimizer.chunk        - Chunk analysis
lagoptimizer.unloadchunks - Unload chunks
lagoptimizer.killmobs     - Remove mobs
lagoptimizer.tpchunk      - Teleport to chunk
lagoptimizer.halt         - Broadcast halt
lagoptimizer.samplememory - Memory sampling
lagoptimizer.sampleticks  - Tick sampling
lagoptimizer.profile      - Spark profiler
lagoptimizer.performance  - Spark health reports
 

Code (YAML):

purge
:
  auto-purge-enabled
: true
  interval
: 300
  max-entities-per-chunk
: 100
  max-entity-age
: 300
  max-distance-from-players
: 32
  whitelist
: [PLAYER, VILLAGER, IRON_GOLEM, WOLF, HORSE ]
  blacklist
: [DROPPED_ITEM, EXPERIENCE_ORB, ARROW, SPECTRAL_ARROW, TRIDENT, FALLING_BLOCK ]
monitoring
:
  enabled
: true
  interval
: 60
  scoreboard
:
    enabled
: true
    title
: "&6Server Performance"
    lines
:
      - "&7TPS
: &f{tps}"
      - "&7Memory
: &f{memory_used}/{memory_max} MB "
      - "
&7Entities : &f{entity_count}"
      - "&7Chunks
: &f{chunk_count}"
      - "&7Players
: &f{player_count}"
  logging
:
    enabled
: true
    file-path
: "plugins/LagOptimizer/logs/performance.log"
    retention-days
: 7
messages
:
  prefix
: "&8[&6LagOptimizer&8] &r"
  purge
: "&aPurged {count} entities!"
  no-permission
: "&cYou don't have permission to use this command!"
  reload
: "&aConfiguration reloaded successfully!"
  toggle
: "&aAuto-purge has been {state}!"
 

- Server: Spigot/Paper 1.20+ (api-version 1.20)
- Dependency: spark
- Java: 17+

1) Place the jar in `plugins/`
2) Install `spark`
3) Restart the server
4) Configure `plugins/LagOptimizer/config.yml` and run `/lagoptimize reload`

New
- Added comprehensive GUI management system with live metrics
- Added whitelist/blacklist editors with pagination and instant config persistence
- Added Clearlag-style commands: `tps`, `memory`, `gc`, `chunk`, `unloadchunks`, `killmobs`, `tpchunk`, `halt`, `samplememory`, `sampleticks`, `profile`, `performance`
- Added Spark integration for advanced profiling and health reports
- Added Paper API integration for enhanced chunk management
- Added `/lagoptimize gui` command for interactive management

Improvements
- Enhanced unloadchunks with safe-chunk filtering and detailed feedback
- Live TPS and memory display in GUI
- Improved command structure with better tab completion
- Enhanced monitoring with real-time scoreboard updates
- Better error handling and fallbacks

Fixes
- Fixed compilation issues with missing imports
- Improved GUI navigation and user experience
- Enhanced configuration management

- Advanced chunk/entity heatmaps and sampling tools
- Real-time performance graphs and charts
- Automated lag detection and alerts
- Integration with more performance monitoring tools
- Advanced entity tracking and analytics

Found a bug or have an idea? Share it on the discussion thread!​
Resource Information
Author:
----------
Total Downloads: 69
First Release: May 22, 2025
Last Update: Yesterday at 1:39 PM
Category: ---------------
All-Time Rating:
0 ratings
Find more info at discord.gg...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings