Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_R6kBnFdE.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
ServerOptimizer - 墨喵 Minecraft 资源
ServerOptimizer 图标

ServerOptimizer

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/serveroptimizer
资源信息

Minecraft 版本: 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2

平台: bukkit paper spigot

标签: management optimization storage

资源介绍
![ServerOptimizer Banner](https://capsule-render.vercel.app/api?type=waving&color=0:0f0c29,50:302b63,100:24243e&height=200&section=header&text=ServerOptimizer&fontSize=60&fontColor=ffffff&fontAlignY=38&desc=High-Performance%20Spigot%20%2F%20Paper%20Optimization%20Plugin&descAlignY=58&descSize=18&animation=fadeIn) ![Profile Views](https://komarev.com/ghpvc/?username=serveroptimizer-modrinth&color=6366f1&style=for-the-badge&label=PLUGIN+VIEWS) [![Minecraft](https://img.shields.io/badge/Minecraft-1.20.4+-00AA00?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZxjeSdoAAABySURBVCiRY2AYBfQ/AAj/GYqLixkYGBj+M5AHBpVBuIMiDFSGIbSNmEYSNBIzCGonTiNBJ34jUSduI34j/hD+j9+I34TfhN+E34TfhN+E34TfhN+E3oTehN6E3oTehN6E3oTehN6E3oTOhM6EzoTOhM6EzgBxHxsmdzxiEAAAAABJRU5ErkJggg==&logoColor=white)](https://papermc.io) [![Paper](https://img.shields.io/badge/Paper-API-00B4D8?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xMyAxNEg3di0yaDZtNC00SDd2Mmgxem0wLTRIN3YyaDEwbTItNEg1djE0aDE0VjZoLTR6TTMgNGgxMnYySDN6Ii8+PC9zdmc+&logoColor=white)](https://papermc.io) [![Java](https://img.shields.io/badge/Java-17+-ED8B00?style=for-the-badge&logo=openjdk&logoColor=white)](https://adoptium.net) [![Maven](https://img.shields.io/badge/Maven-Build-C71A36?style=for-the-badge&logo=apachemaven&logoColor=white)](https://maven.apache.org) [![License](https://img.shields.io/badge/License-MIT-purple?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](LICENSE) [![Discord](https://img.shields.io/badge/Discord-allay__gaming__x-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com) [![Author](https://img.shields.io/badge/Author-Pawan-ff6b6b?style=for-the-badge&logo=github&logoColor=white)](https://github.com)

🧩 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 WeakHashMap so 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 HIGH priority, after WorldGuard's region checks
  • ✅ EssentialsX — softdepend declared, no hard conflicts
  • ✅ All listeners use ignoreCancelled = true to skip already-processed events

🔧 Developer Quality

  • 🔁 Hot-reload via /sopt reload — no server restart needed
  • 🧵 Thread-safe throughout (ConcurrentHashMap, WeakHashMap, AtomicInteger)
  • 📝 Full config.yml with 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

allay_gaming_x's Discord status


![Footer](https://capsule-render.vercel.app/api?type=waving&color=0:24243e,50:302b63,100:0f0c29&height=120&section=footer&animation=fadeIn) **Made with ❤️ by [Pawan](https://github.com/ALLAY-XD-20)** *Keep your server fast. Keep your players happy.* ⭐ **If this plugin helped your server, please leave a review on Modrinth!** ⭐
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Remove C418

价格:0 墨喵币
下载量:0

查看详情
HereNavy

价格:0 墨喵币
下载量:0

查看详情
Elemental origins

价格:0 墨喵币
下载量:0

查看详情
Better look client

价格:0 墨喵币
下载量:0

查看详情