ChunkAnalyzer
一款适用于 Minecraft 1.21 - 26.3 的 Paper、Spigot 和 Bukkit 插件,帮助服务器管理员查找并修复由加载区块引起的延迟问题。
简介
ChunkAnalyzer 扫描已加载的区块,并根据实体、方块实体、玩家、盔甲架、红石组件、漏斗、可更新方块和光源计算负载评分。该插件专为需要识别卡顿机器(lag machines)和高负载区块而无需运行完整分析器的服务器管理员设计。插件在后台运行,缓存结果,并通过游戏内 GUI 提供数据访问。
与通用服务器分析器相比,其主要区别在于提供了区块级别的视图。您可以按负载对区块进行排序,按世界过滤,查看精确坐标,并直接传送至区块中心。卡顿机器检测使用明确的阈值,因此如果一个区块包含超过 500 个实体、超过 50 个盔甲架、超过 100 个红石方块或超过 20 个漏斗,则会被标记为有问题。
深度分析是可选的。启用后,插件还会扫描红石方块、漏斗、可更新方块和光源。对于拥有数千个加载区块的服务器,禁用深度分析可降低 CPU 占用率。数据存储在 cache.yml 中,后台扫描以每秒 5 个区块的速度分批运行,每个区块有 30 秒的冷却时间。
负载评分规则如下:每个玩家加 20 分,每个非玩家实体加 1 分,每个方块实体加 10 分,每个盔甲架加 2 分。启用深度分析时,红石方块加 3 分,漏斗加 5 分,可更新方块加 2 分,光源加 1 分。
功能
- 监控已加载区块中的实体、玩家、方块实体、盔甲架、红石组件、漏斗、可更新方块和光源。
- 当超过阈值时将区块标记为卡顿机器:
>500 个实体、>50 个盔甲架、>100 个红石方块或 >20 个漏斗。
- 提供带有世界过滤器(主世界、下界、末地)、分页、负载评分颜色编码以及点击传送功能的 GUI 菜单。
- 默认支持英文和俄文翻译。可以在
config.yml 的 messages 部分添加其他语言。
- 提供针对红石、漏斗、可更新方块和光源的可选深度分析。在大型服务器上禁用它以获得更好的性能。
- 将区块数据缓存到
cache.yml 中,以减少重复扫描并保持 GUI 响应速度。
- 在后台以每秒 5 个区块的速度分批扫描区块,每个区块有 30 秒的冷却时间。
- 跟踪实体生成、消失、传送以及区块加载/卸载事件,以保持数据最新。
- 允许配置扫描行为、语言和显示选项。
安装
- 下载 ChunkAnalyzer
1.0.0 JAR 文件。
- 将 JAR 文件放入服务器的
plugins 文件夹中。
- 重启服务器或使用插件管理器加载插件。
- 编辑
plugins/ChunkAnalyzer/config.yml 以匹配您的服务器设置。
- 通过 LuckPerms 等方式将
chunkanalyzer.menu 权限分配给管理员。
无需额外依赖。
用法
| 命令 |
权限 |
描述 |
/ca menu |
chunkanalyzer.menu |
打开区块分析 GUI。 |
打开 GUI 后,使用世界过滤器按钮聚焦于主世界、下界或末地。区块按负载评分排序并采用颜色编码:绿色表示低负载,黄色或橙色表示中等负载,红色表示高负载,岩浆色表示可能是卡顿机器。悬停在区块项目上可查看实体数量、玩家数量、方块实体数量,以及在启用深度分析时查看红石和漏斗详情。点击区块可传送到其中心最高的安全 Y 坐标处。如果区块被标记为卡顿机器,会显示警告信息。
配置
插件会生成 plugins/ChunkAnalyzer/config.yml。最重要的设置如下:
show-green-chunks: false
deep-analyze: true
language: en
messages:
en:
player_only: "This command is for players only!"
usage: "Usage: /ca menu"
teleport: "Teleported to chunk [%s, %s]"
lag_machine_warning: "Warning: Possible lag machine at [%s, %s]"
menu_title: "Chunk Analyzer - %d"
world_overworld: "Overworld"
world_nether: "Nether"
world_the_end: "The End"
button_previous: "Previous page"
button_next: "Next page"
button_current_world: "Current world"
chunk_info: "Chunk [%s, %s]"
world: "World: %s"
coordinates: "Coordinates: %s, %s"
entities: "Entities: %s"
players: "Players: %s"
tile_entities: "Tile Entities: %s"
armor_stands: "Armor Stands: %s"
redstone_blocks: "Redstone blocks: %s"
hoppers: "Hoppers: %s"
updatable_blocks: "Updatable blocks: %s"
light_sources: "Light sources: %s"
load_score: "Load score: %s"
click_to_teleport: "Click to teleport"
ru:
player_only: "Эта команда только для игроков!"
usage: "Использование: /ca menu"
teleport: "Телепортирован в чанк [%s, %s]"
lag_machine_warning: "Предупреждение: Возможная лаг-машина в [%s, %s]"
menu_title: "Анализатор чанков - %d"
world_overworld: "Верхний мир"
world_nether: "Ад"
world_the_end: "Энд"
button_previous: "Предыдущая страница"
button_next: "Следующая страница"
button_current_world: "Текущий мир"
chunk_info: "Чанк [%s, %s]"
world: "Мир: %s"
coordinates: "Координаты: %s, %s"
entities: "Сущности: %s"
players: "Игроки: %s"
tile_entities: "Tile Entities: %s"
armor_stands: "Armor Stands: %s"
redstone_blocks: "Редстоун блоки: %s"
hoppers: "Воронки: %s"
updatable_blocks: "Обновляемые блоки: %s"
light_sources: "Источники света: %s"
load_score: "Оценка нагрузки: %s"
click_to_teleport: "Нажмите для телепортации"
show-green-chunks 控制是否显示评分为 50 或以下的低影响区块。默认值为 false,以聚焦于有问题的区块。deep-analyze 启用对红石、漏斗、可更新方块和光源的扫描。在加载了大量区块的服务器上请禁用此选项。language 选择消息集。可在 messages 下添加新语言,并将 language 设置为对应的键名。
兼容性
- Minecraft:1.21 - 26.3
- 平台:Paper、Spigot、Bukkit
- Java:服务器平台支持的任何版本;无需特定的 Java 版本
目前已知与其他插件或库无兼容性问题。
技术信息
- 语言:Java
- 平台 API:Bukkit、Spigot、Paper
- 构建方式:标准插件 JAR
- 关键依赖项:无
- 存储:使用
cache.yml 缓存区块数据
许可证
本项目根据 GNU General Public License v3.0 分发。
ChunkAnalyzer
A Paper, Spigot, and Bukkit plugin for Minecraft 1.21 - 26.3 that helps server administrators find and fix lag caused by loaded chunks.
What is it
ChunkAnalyzer scans loaded chunks and calculates a load score based on entities, tile entities, players, armor stands, redstone components, hoppers, updatable blocks, and light sources. It is built for server administrators who need to identify lag machines and heavy chunks without running a full profiler. The plugin works in the background, caches results, and exposes the data through an in-game GUI.
The main difference from generic server profilers is the chunk-level view. You can sort chunks by load, filter by world, see exact coordinates, and teleport directly to the chunk center. Lag machine detection uses explicit thresholds, so a chunk with more than 500 entities, more than 50 armor stands, more than 100 redstone blocks, or more than 20 hoppers is flagged.
Deep analysis is optional. When enabled, the plugin also scans for redstone blocks, hoppers, updatable blocks, and light sources. On servers with thousands of loaded chunks, disabling deep analysis reduces CPU usage. Data is stored in cache.yml, and background scanning runs in batches of 5 chunks per second with a 30-second cooldown per chunk.
Load scoring assigns 20 points per player, 1 point per non-player entity, 10 points per tile entity, and 2 points per armor stand. With deep analysis enabled, redstone blocks add 3 points, hoppers add 5 points, updatable blocks add 2 points, and light sources add 1 point.
Features
- Monitors loaded chunks for entities, players, tile entities, armor stands, redstone components, hoppers, updatable blocks, and light sources.
- Flags chunks as lag machines when thresholds are exceeded:
>500 entities, >50 armor stands, >100 redstone blocks, or >20 hoppers.
- Provides a GUI menu with world filters for Overworld, Nether, and The End, pagination, load score colors, and click-to-teleport.
- Supports English and Russian translations out of the box. Additional languages can be added under
messages in config.yml.
- Offers optional deep analysis for redstone, hoppers, updatable blocks, and light sources. Disable it for better performance on large servers.
- Caches chunk data in
cache.yml to reduce redundant scans and keep the GUI responsive.
- Scans chunks in the background in batches of 5 per second, with a 30-second cooldown per chunk.
- Tracks entity spawns, despawns, teleports, and chunk load/unload events to keep data current.
- Allows configuration of scanning behavior, language, and display options.
Installation
- Download the ChunkAnalyzer
1.0.0 JAR.
- Place the JAR in your server's
plugins folder.
- Restart the server or load the plugin with a plugin manager.
- Edit
plugins/ChunkAnalyzer/config.yml to match your server.
- Assign the
chunkanalyzer.menu permission to administrators, for example through LuckPerms.
No additional dependencies are required.
Usage
| Command |
Permission |
Description |
/ca menu |
chunkanalyzer.menu |
Opens the chunk analysis GUI. |
After opening the GUI, use the world filter buttons to focus on Overworld, Nether, or The End. Chunks are sorted by load score and color-coded: green for low, yellow or orange for medium, red for high, and magma for likely lag machines. Hover over a chunk item to see entity count, player count, tile entities, and, when deep analysis is enabled, redstone and hopper details. Click a chunk to teleport to its center at the highest safe Y level. A warning is shown for chunks flagged as lag machines.
Configuration
The plugin generates plugins/ChunkAnalyzer/config.yml. The most important settings are:
show-green-chunks: false
deep-analyze: true
language: en
messages:
en:
player_only: "This command is for players only!"
usage: "Usage: /ca menu"
teleport: "Teleported to chunk [%s, %s]"
lag_machine_warning: "Warning: Possible lag machine at [%s, %s]"
menu_title: "Chunk Analyzer - %d"
world_overworld: "Overworld"
world_nether: "Nether"
world_the_end: "The End"
button_previous: "Previous page"
button_next: "Next page"
button_current_world: "Current world"
chunk_info: "Chunk [%s, %s]"
world: "World: %s"
coordinates: "Coordinates: %s, %s"
entities: "Entities: %s"
players: "Players: %s"
tile_entities: "Tile Entities: %s"
armor_stands: "Armor Stands: %s"
redstone_blocks: "Redstone blocks: %s"
hoppers: "Hoppers: %s"
updatable_blocks: "Updatable blocks: %s"
light_sources: "Light sources: %s"
load_score: "Load score: %s"
click_to_teleport: "Click to teleport"
ru:
player_only: "Эта команда только для игроков!"
usage: "Использование: /ca menu"
teleport: "Телепортирован в чанк [%s, %s]"
lag_machine_warning: "Предупреждение: Возможная лаг-машина в [%s, %s]"
menu_title: "Анализатор чанков - %d"
world_overworld: "Верхний мир"
world_nether: "Ад"
world_the_end: "Энд"
button_previous: "Предыдущая страница"
button_next: "Следующая страница"
button_current_world: "Текущий мир"
chunk_info: "Чанк [%s, %s]"
world: "Мир: %s"
coordinates: "Координаты: %s, %s"
entities: "Сущности: %s"
players: "Игроки: %s"
tile_entities: "Tile Entities: %s"
armor_stands: "Armor Stands: %s"
redstone_blocks: "Редстоун блоки: %s"
hoppers: "Воронки: %s"
updatable_blocks: "Обновляемые блоки: %s"
light_sources: "Источники света: %s"
load_score: "Оценка нагрузки: %s"
click_to_teleport: "Нажмите для телепортации"
show-green-chunks controls whether low-impact chunks with a score of 50 or less are displayed. Default is false to focus on problematic chunks. deep-analyze enables scanning for redstone, hoppers, updatable blocks, and light sources. Disable it on servers with many loaded chunks. language selects the message set. Add new languages under messages and set language to the corresponding key.
Compatibility
- Minecraft: 1.21 - 26.3
- Platform: Paper, Spigot, Bukkit
- Java: any version supported by the server platform; no specific Java version is required
No known incompatibilities with other plugins or libraries.
Technologies
- Language: Java
- Platform API: Bukkit, Spigot, Paper
- Build: standard plugin JAR
- Key dependencies: none
- Storage:
cache.yml for cached chunk data
License
This project is distributed under the GNU General Public License v3.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧