ChunkGuard 是一款轻量级、高性能的实体管理插件,适用于 Minecraft Paper 1.21+ 服务器。它通过严格限制单个区块内特定实体和方块的数量,来保护服务器的 TPS 以及玩家客户端的 FPS,同时不会破坏合法的原版刷怪农场。
主要特性
- 智能刷怪农场豁免: 自动忽略由自然生成器或生物群系生成产生的敌对怪物,让传统刷怪农场完美运行,同时防止刷怪蛋和发射器的滥用。
- 细粒度实体限制: 可为多个类别定义每个区块的最大数量上限,包括悬挂实体(物品展示框、画)、交通工具(船、矿车)、被动动物和敌对怪物。
- 针对性监控: 可通过配置文件开启或关闭特定的检查项(例如仅监控放置行为而忽略自然生成),以自定义服务器所需的保护级别。
- 非侵入式通知: 当玩家达到限制时,通过简洁的操作栏消息进行提醒,避免聊天刷屏的同时让玩家知情。
- 游戏内命令: 使用
/chunkguard status [page] 分页浏览所有追踪的实体限制;使用 /chunkguard reload 热重载配置文件而无需重启服务器;使用 /chunkguard help 获取完整的命令参考。
- 干净的控制台输出: 正常运行期间控制台保持完全静默。当强制执行限制时会记录警告日志,而详细的尝试日志则隐藏在可选的调试模式之后,便于微调。
功能说明
虽然标准的延迟清理插件非常适合清理掉落的物品,但它们无法解决玩家在储物间放置 400 个物品展示框或在 1x1 的围栏中繁殖 200 头牛的问题。这些密集的实体集群会导致严重的客户端帧率下降和服务端 ticking 延迟。
ChunkGuard 充当一个严格且无形的边界。它会积极监听玩家的交互、怪物生成和方块放置行为。如果玩家试图在限制为 20 的区块中放置第 21 个物品展示框,该放置操作会被立即取消,物品仍保留在玩家手中,并且他们会收到操作栏中的温和警告。
智能生成系统
区块限制器常见的问题是会破坏玩家建造的刷怪机。ChunkGuard 通过评估实体生成的原因来解决这一问题。
如果僵尸是从地牢生成器或黑暗环境中自然生成的,ChunkGuard 会允许其存在,确保玩家辛苦建造的农场能继续产出掉落物。然而,如果玩家试图通过狂刷僵尸刷怪蛋或使用发射器来绕过服务器限制,一旦区块达到上限,ChunkGuard 就会立即介入并阻止生成。注意:被动动物(如牛或猪)始终受到限制,无论它们如何生成,以防止无限繁殖造成的延迟机器。
权限
| 权限 |
描述 |
默认值 |
chunkguard.bypass |
绕过所有区块实体限制 |
OP |
chunkguard.reload |
通过命令重载配置文件 |
OP |
chunkguard.notify |
接收关于违反限制的管理员通知 |
OP |
安装与配置
ChunkGuard 是一款专为 Paper 1.21+ 设计的服务端插件。只需将 JAR 文件放入 plugins 文件夹并重启服务器即可。
生成的 plugins/ChunkGuard/config.yml 预配置了针对每种主要实体类型的高度平衡、对服务器友好的默认值(例如:每个区块最多 30 头猪、20 个物品展示框、10 辆矿车)。您可以轻松调整这些数值,取消注释投射物限制,或切换特定的监控功能,以完美匹配您服务器的硬件约束。
? 支持与错误报告
发现错误或需要帮助设置插件?
请在 Discord 上直接报告问题。
ChunkGuard is a lightweight, high-performance entity management plugin for Minecraft Paper 1.21+ servers. It protects your server's TPS and your players' client-side FPS by strictly limiting the number of specific entities and blocks that can exist within a single chunk, without breaking legitimate vanilla mob farms.
Key Features
- Smart Mob Farm Exemption: Automatically ignores hostile mobs generated by natural spawners or biome generation, allowing traditional mob farms to function perfectly while still preventing spawn egg and dispenser abuse.
- Granular Entity Limits: Define exact maximum limits per chunk across multiple categories, including hanging entities (Item Frames, Paintings), transportation (Boats, Minecarts), passive animals, and hostile mobs.
- Targeted Monitoring: Toggle specific checks on or off via the config (e.g., monitor only placements but ignore natural spawning) to customize the exact level of protection your server needs.
- Non-Intrusive Notifications: Alerts players with a clean Action Bar message when they hit a limit, preventing chat spam while keeping them informed.
- In-Game Commands: Use
/chunkguard status [page] to browse all tracked entity limits in a paginated view, /chunkguard reload to hot-reload the config without a restart, and /chunkguard help for a full command reference.
- Clean Console Output: The console stays completely silent during normal operation. Block warnings are always logged when a limit is enforced, while verbose attempt logging is gated behind an optional debug mode for fine-tuning.
Functionality
While standard lag-clearing plugins are fantastic for cleaning up dropped items, they don't solve the issue of a player placing 400 Item Frames in their storage room or breeding 200 cows in a 1x1 pen. These dense clusters of entities cause massive client-side frame drops and severe server-side ticking lag.
ChunkGuard acts as a strict, invisible boundary. It actively listens to player interactions, mob spawning, and block placements. If a player attempts to place a 21st Item Frame in a chunk where the limit is set to 20, the placement is instantly canceled, the item stays in their hand, and they receive a gentle warning in their action bar.
The Smart Spawning System
A common issue with chunk limiters is that they break player-built mob grinders. ChunkGuard solves this by evaluating the reason an entity spawned.
If a zombie spawns from a dungeon spawner or naturally in the dark, ChunkGuard allows it, ensuring your players' hard-built farms continue to yield drops. However, if a player tries to bypass server limits by spamming Zombie spawn eggs or using a dispenser, ChunkGuard will immediately step in and block the spawn once the chunk limit is reached. Note: Passive animals (like cows or pigs) are always limited, regardless of how they spawn, to prevent infinite breeding lag machines.
Permissions
| Permission |
Description |
Default |
chunkguard.bypass |
Bypass all chunk entity limits |
OP |
chunkguard.reload |
Reload the configuration file via command |
OP |
chunkguard.notify |
Receive admin notifications for limit violations |
OP |
Installation & Configuration
ChunkGuard is a server-side plugin designed specifically for Paper 1.21+. Simply drop the JAR file into your plugins folder and restart your server.
The generated plugins/ChunkGuard/config.yml comes pre-configured with highly balanced, server-friendly defaults for every major entity type (e.g., max 30 Pigs, 20 Item Frames, 10 Minecarts per chunk). You can easily adjust these numbers, uncomment projectile limits, or toggle specific monitoring features to perfectly match your server's hardware constraints.
? Support & Bug Reports
Found a bug or need help setting up the plugin?
Report issues directly on Discord.
评论 0
登录后参与评分
还没有评论,来抢沙发吧