✨ XpMerge
更少的经验球。更高的帧率。相同的经验值。
自动将附近分散的经验球合并为一个——静默、安全,且绝不会导致掉落物复制。
? 概述
XpMerge 是一款轻量级的原生 Folia 经验球合并插件,专为注重性能的服务端设计。在每一个配置的时间间隔内,它会扫描所有已加载的区块,查找紧密聚集的经验球簇,并将它们坍缩为单个经验球——不丢失任何经验值,没有漏洞,也没有麻烦。
大型怪物农场、经验磨坊和附魔装置可以在几秒钟内生成数百个经验球。XpMerge 通过减少实体数量从根源上消除这种卡顿,而不会触碰收集逻辑。玩家永远不会察觉它的运行——他们只会觉得服务器变得更流畅了。
✨ 特性
- ? 基于时间间隔的扫描 — 合并操作按照可配置的刻数计划执行,而非每一帧都触发
- ? 基于半径的聚类 — 设定方块半径内的经验球会坍缩为一个,同时保留总经验值
- ? Folia 原生线程支持 — 使用
RegionScheduler 处理每个 8×8 区块区域,意味着所有的实体读取和写入都在正确的区域线程上进行,零不安全跨区域访问
- ? 防复制设计 — 在移除前立即重新验证经验球,以处理扫描过程中因收集事件导致的竞态条件
- ? 多世界支持 — 同时扫描所有已加载的世界
- ?️ 热重载 — 通过
/xpmerge reload 在不重启服务器的情况下更新配置
- ? 状态命令 — 一目了然地检查当前设置和终身合并计数
- ? 调试模式 — 可选的每次合并控制台日志记录用于诊断,默认关闭
? 防复制安全性与瓶装经验兼容性
XpMerge 针对那些能够装瓶、提取或以其他方式操纵经验球实体的插件进行了严格测试——这类插件在与经验球合并结合使用时特别容易受到复制漏洞的影响。
关键的安全措施是:XpMerge 在移除之前会立即重新验证每一个经验球。 如果在扫描期间到合并执行之间,玩家或插件已经收集了某个经验球,则该经验球将被完全跳过。经验值不会被重复计算或发放两次。
已与以下插件测试并确认无复制漏洞:
经验值在内部作为 long 类型累积,然后再写回为 int 类型,从而防止在大经验球簇情况下出现溢出边缘情况。最终值被钳制在 Integer.MAX_VALUE 作为硬性上限。
?️ 兼容性
| 平台 |
支持版本 |
| Paper |
1.21.10 — 1.21.11 (广泛支持 1.21.x) |
| Folia |
1.21.10 — 1.21.11 (原生线程支持) |
⚠️ 不支持 Spigot/Bukkit。必须使用 Paper 或 Folia。
Folia 支持是一等公民——扫描架构是从底层围绕 RegionScheduler 设计的,而不是事后附加的。
? 命令与权限
| 命令 |
描述 |
权限 |
/xpmerge status |
显示当前间隔、半径、调试状态以及合并的经验球总数 |
xpmerge.admin |
/xpmerge reload |
热重载配置并重新启动合并任务 |
xpmerge.admin |
xpmerge.admin 默认仅允许 OP(管理员) 使用。
⚙️ 配置
配置文件位于:
plugins/XpMerge/config.yml
以下是完整的默认配置:
# 每次合并扫描之间的刻数。20 刻 = 1 秒。
# 数值越低 = 合并越激进,CPU 占用略高。最小值:1。
merge-interval: 5
# 经验球合并在一起的方块半径。
# 在此距离内的所有经验球都会坍缩为一个。
merge-radius: 20.00
# 每次合并经验球时在控制台打印一行。生产环境请关闭。
debug: false
配置详解
merge-interval — 扫描触发的频率,单位为刻。5 = 每四分之一秒一次。较低的数值会以略微增加 CPU 开销为代价进行更激进的合并。硬性最小值为 1。
merge-radius — 用于聚类附近经验球的方块半径。20.0 覆盖范围很广,非常适合大型农场和高密度经验设置。
debug — 启用时,会将每次单独的合并记录到控制台,包括位置、经验球数量和总经验值。适用于测试——在生产环境中请保持关闭。
? 安装
- 从发布页面下载最新的
.jar 文件
- 将其放入你的
/plugins 文件夹
- 重启服务器 (不要使用
/reload)
- 根据需要编辑
plugins/XpMerge/config.yml
- 使用
/xpmerge reload 实时应用配置更改
? 许可证
XpMerge 是开源的,并根据 MIT 许可证 分发。
欢迎在项目仓库中提交贡献、问题报告和拉取请求。
专为那些不想在经验农场和良好性能之间做出选择的服务端构建。
✨ XpMerge
Less orbs. More frames. Same XP.
Automatically merges nearby experience orbs into one — silently, safely, and without ever duping a drop.
? Overview
XpMerge is a lean, Folia-native XP orb merging plugin built for servers that care about performance. Every configured interval, it sweeps all loaded chunks, finds clusters of experience orbs in close proximity, and collapses them into a single orb — no XP lost, no exploits, no drama.
Massive mob farms, XP grinders, and enchanting setups can spawn hundreds of orbs in seconds. XpMerge kills that lag at the source by reducing entity count without touching collection logic. Players never notice it's running — they just notice the server feels smoother.
✨ Features
- ? Interval-based sweeping — merges fire on a configurable tick schedule, not every frame
- ? Radius-based clustering — orbs within a set block radius collapse into one, preserving total XP
- ? Folia-native threading — uses
RegionScheduler per 8×8 chunk region, meaning all entity reads and writes happen on the correct regional thread with zero unsafe cross-region access
- ? Dupe-safe design — re-validates orbs immediately before removal to handle race conditions from collection events mid-sweep
- ? Multi-world support — sweeps every loaded world simultaneously
- ?️ Live reload — update config without restarting via
/xpmerge reload
- ? Status command — inspect current settings and lifetime merge count at a glance
- ? Debug mode — optional per-merge console logging for diagnostics, off by default
? Dupe Safety & Bottled XP Compatibility
XpMerge was rigorously tested against plugins that bottle, extract, or otherwise manipulate XP orb entities — a category of plugins that are particularly vulnerable to dupe exploits when combined with orb merging.
The key safeguard: XpMerge re-validates every orb immediately before removal. If a player or plugin has already collected an orb between the sweep scan and the merge execution, that orb is skipped entirely. XP is never double-counted or awarded twice.
Tested and confirmed dupe-free with:
XP values are accumulated as a long internally before being written back as an int, preventing overflow edge cases on large orb clusters. The final value is clamped to Integer.MAX_VALUE as a hard ceiling.
?️ Compatibility
| Platform |
Supported Versions |
| Paper |
1.21.10 — 1.21.11 (1.21.x broadly supported) |
| Folia |
1.21.10 — 1.21.11 (natively threaded) |
⚠️ Spigot/Bukkit are not supported. Paper or Folia is required.
Folia support is first-class — the sweep architecture was designed around RegionScheduler from the ground up, not bolted on after.
? Commands & Permissions
| Command |
Description |
Permission |
/xpmerge status |
Shows current interval, radius, debug state, and total orbs merged |
xpmerge.admin |
/xpmerge reload |
Hot-reloads config and restarts the merge task |
xpmerge.admin |
xpmerge.admin defaults to OP only.
⚙️ Configuration
The config file is located at:
plugins/XpMerge/config.yml
Below is the full default configuration:
# How many ticks between each merge sweep. 20 ticks = 1 second.
# Lower = more aggressive merging, slightly more CPU. Minimum: 1.
merge-interval: 5
# Block radius within which orbs are merged together.
# All orbs within this distance of each other collapse into one.
merge-radius: 20.00
# Print a line to console every time orbs are merged. Turn off in production.
debug: false
Config Breakdown
merge-interval — How often the sweep fires, in ticks. 5 = every quarter second. Lower values merge more aggressively at the cost of slightly more CPU overhead. Hard minimum of 1.
merge-radius — The block radius used to cluster nearby orbs. 20.0 casts a wide net, ideal for large farms and high-density XP setups.
debug — When enabled, logs every individual merge to console including location, orb count, and total XP. Useful for testing — leave it off in production.
? Installation
- Download the latest
.jar from the releases section
- Drop it into your
/plugins folder
- Restart your server (not
/reload)
- Edit
plugins/XpMerge/config.yml to your liking
- Use
/xpmerge reload to apply config changes live
? License
XpMerge is open-source and distributed under the MIT License.
Contributions, issues, and pull requests are welcome on the project repository.
Built for servers that don't want to choose between XP farms and good performance.
评论 0
登录后参与评分
还没有评论,来抢沙发吧