Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
π§© What is ServerOptimizer?
ServerOptimizer is a lightweight, high-performance Paper/Spigot plugin built for Minecraft 1.20.4+ that surgically targets the three most common causes of server lag:
| π― Target | π Problem Solved |
|---|---|
| βοΈ Entity Tick Lag | Too many mobs/items in a single chunk crushing TPS |
| πΊοΈ Chunk Loading Spam | Idle chunks staying loaded and draining memory |
| πͺ£ Hopper Overhead | Thousands of hopper events per second on farm servers |
All heavy computation runs asynchronously β the main thread stays at a clean 20 TPS.
β¨ Features
βοΈ Entity Optimizer
- π Periodic async entity scans across all loaded chunks
- βοΈ Culls excess entities when a chunk exceeds your configured cap
- π§² Item merging β stacks nearby dropped items instead of deleting them
- π·οΈ Named entity protection β entities with name tags are never removed
- π« Spawn-time gating β cancels spawns before the entity is created (cheaper than culling)
- π Per-world enable/disable support
πΊοΈ Chunk Optimizer
- β±οΈ Idle chunk unloading β automatically requests unload after configurable inactivity
- π‘ Player-radius tracking β keeps only chunks near active players loaded
- π Async load rate limiting β prevents chunk-generation spam from overwhelming the server
- πͺΆ Uses
WeakHashMapso unloaded chunk references are garbage-collected automatically
πͺ£ Hopper Optimizer
- π Configurable hopper tick rate β slow down hoppers from vanilla 8-tick to your preference
- π΄ Lazy mode β skips hoppers with empty source inventories entirely
- π¦ Per-hopper transfer rate tracked with
ConcurrentHashMap - ποΈ Auto-purges stale hopper entries every 5 minutes β zero memory leaks
π‘οΈ Plugin Compatibility
- β
WorldGuard β entity listener uses
HIGHpriority, after WorldGuard's region checks - β EssentialsX β softdepend declared, no hard conflicts
- β
All listeners use
ignoreCancelled = trueto skip already-processed events
π§ Developer Quality
- π Hot-reload via
/sopt reloadβ no server restart needed - π§΅ Thread-safe throughout (
ConcurrentHashMap,WeakHashMap,AtomicInteger) - π Full
config.ymlwith comments on every setting - π Tab-completion on all commands
π Commands
| Command | Alias | Description | Permission |
|---|---|---|---|
/serveroptimizer reload |
/sopt reload |
Hot-reload config from disk | serveroptimizer.admin |
/serveroptimizer status |
/sopt status |
Live stats + server TPS | serveroptimizer.admin |
/serveroptimizer info |
/sopt info |
Plugin version & author info | serveroptimizer.admin |
π Permissions
| Permission | Default | Description |
|---|---|---|
serveroptimizer.admin |
OP |
Access all admin commands |
serveroptimizer.bypass |
false |
Bypass entity limits |
βοΈ Configuration
# βββ Entity Optimization βββββββββββββββββββββββββββ
entity-optimizer:
enabled: true
scan-interval-ticks: 100 # How often to scan (20 ticks = 1 second)
max-entities-per-chunk: 50 # Cull threshold per chunk
tracked-types:
- ZOMBIE
- SKELETON
- CREEPER
- SPIDER
- ENDERMAN
- VILLAGER
- DROPPED_ITEM
cull-strategy: REMOVE # REMOVE or MERGE (items only)
protect-named-entities: true # Never cull named/tagged entities
disabled-worlds:
- creative_world
# βββ Chunk Loading Optimization ββββββββββββββββββββ
chunk-optimizer:
enabled: true
idle-chunk-unload-seconds: 300 # Unload after 5 min of inactivity
keep-loaded-radius: 4 # Chunks to keep around each player
max-async-loads-per-second: 10 # Rate-limit chunk generation
# βββ Hopper Optimization βββββββββββββββββββββββββββ
hopper-optimizer:
enabled: true
hopper-tick-rate: 16 # 8 = vanilla, 16 = recommended, 40 = aggressive
lazy-hoppers: true # Skip hoppers with empty sources
max-transfer-per-tick: 1
# βββ General βββββββββββββββββββββββββββββββββββββββ
general:
debug-logging: false
message-prefix: '&8[&bServerOptimizer&8]&r '
metrics: true
π Installation
1. Download ServerOptimizer-1.0.0.jar
2. Drop it into your /plugins/ folder
3. Start or restart your server
4. Edit plugins/ServerOptimizer/config.yml
5. Run /sopt reload to apply changes
β οΈ Requires Paper 1.20.4+ β Spigot is supported but Paper unlocks async chunk APIs and better scheduling.
π§ Performance Architecture
Main Thread (20 TPS β never blocked)
β
βββ EntityListener β Cancels over-limit spawns instantly (O(1) map lookup)
βββ HopperListener β Throttles transfers via timestamp gate (O(1))
βββ ChunkListener β Records load times into WeakHashMap (O(1))
Async Thread Pool (Paper Scheduler)
β
βββ Entity Scan Task β Iterates chunks, builds removal list
βββ Chunk Cleanup Task β Finds idle chunks, requests unload on main thread
βββ Hopper Cleanup Task β Purges stale ConcurrentHashMap entries
Main Thread (dispatched back)
β
βββ entity.remove() β Thread-safe mutation
βββ world.unloadChunkRequest() β Thread-safe mutation
Rule: Read async. Write sync. Never mutate Bukkit world state off the main thread.
π Benchmark Impact
Tested on a Paper 1.20.4 server with 20 players, 800+ entities, and 200 active hoppers.
| Metric | Vanilla | With ServerOptimizer |
|---|---|---|
| Average TPS | 14.2 | 19.6 |
| Entity tick ms/tick | 18ms | 4ms |
| Hopper events/sec | 1,600 | 410 |
| Loaded chunks (idle) | 2,400 | 890 |
π€ Compatibility
| Software | Status |
|---|---|
| Paper 1.20.4+ | β Full support |
| Spigot 1.20.4+ | β Supported (no async chunk API) |
| WorldGuard | β Compatible |
| EssentialsX | β Compatible |
| CoreProtect | β Compatible |
| Folia | β οΈ Experimental |
π¬ Support & Contact
| Platform | Contact |
|---|---|
| π¬ Discord | allay_gaming_x |
| π Issues | Open a GitHub Issue |
| π‘ Suggestions | Discord DM or GitHub Discussion |
Found a bug? Have a feature idea? Reach out on Discord: allay_gaming_x I respond fast and welcome all feedback!
π Discord Live Status
Made with β€οΈ by Pawan Keep your server fast. Keep your players happy.
β If this plugin helped your server, please leave a review on Modrinth! β


