NeatSort
适用于 Paper 服务器的箱子与背包排序插件 —— 专为防止 Minecraft 更新导致其失效而构建。
已在 Paper 1.21.11、26.2 和 26.3 上测试通过。单文件,无依赖项。
为什么需要这个插件
ChestSort 是该领域的参考插件 —— 下载量 299,530 次,评分 4.7 星。其最后一次发布是在 2024 年 10 月。我们下载了该版本并在当前的两个 Paper 版本上自行启动:
- 在 Paper 1.21.11 上它仍然可以正常工作,
- 在 Paper 26.2 上启用失败:
java.lang.ExceptionInInitializerError →
NumberFormatException: For input string: "build",
错误由内置辅助库在解析服务器版本号时抛出。
它并非死在排序逻辑中,而是死在了一个版本解析器里。
NeatSort 的设计旨在使这种故障模式成为不可能:
- 无内置库、无 NMS(网络通信层)、无反射调用服务器内部代码
- 绝不读取或解析服务器版本字符串
- 分类器中不引用任何
Material 或 Tag 常量 —— 物品根据 Material.name() 和基础 Bukkit 谓词进行分组,因此未来 Minecraft 版本新增的材质会被归入“其他”类别,而不是抛出异常。这一点在每个构建版本中都经过验证:测试断言确保了对服务器所知 所有 材质的分类均能正常运作 —— 在 Paper 1.21.11 上为 1,658 种材质,在 26.2 上为 1,691 种。
其他排序插件无法提供的保障
排序插件最糟糕的行为就是丢失一组物品。
NeatSort 先在内存中构建排序后的布局,统计旧布局和新布局中每种物品的数量,并且 仅在两者数量完全匹配时才写入更改。如果有任何一件物品可能丢失,则不会执行任何写入操作:容器保持原样,控制台记录警告信息,并告知玩家。未排序总比少一组物品要好。
功能特性
- 关闭时自动整理箱子、 barrels、潜影盒和末影箱(支持按玩家开关)
- 整理玩家背包(默认排除快捷栏 —— 你的剑会保留在你放置的位置)
- 在打开的容器内使用鼠标中键即可整理
- 合并部分堆叠的物品,尊重堆叠上限,区分命名和附魔物品
- 每个玩家的设置会在重启后持久保存
- 支持按世界禁用列表
- 仅处理普通存储容器 —— 绝不触碰熔炉、酿造台、铁砧或由其他插件持有的容器(可配置黑名单以排除背包、保险箱和箱子类插件)
从 ChestSort 迁移?
/neatsort import
读取 plugins/ChestSort/config.yml 并接管具有对应功能的设置(自动排序开关、默认值、热键、冷却时间、禁用的世界)。你的 ChestSort 配置文件只读,不会被修改。无法迁移的内容会被报告出来,而不是静默丢弃 —— ChestSort 的分类文本文件和 sorting-method 字符串没有对应项,因为 NeatSort 基于固定的、不受版本影响的规则进行排序,而非通过可编辑的材质列表。
命令
| 命令 |
说明 |
/neatsort |
显示你当前的设置 |
/neatsort on / off / toggle |
关闭容器时自动排序 |
/neatsort inv |
立即整理你的背包 |
/neatsort inv on / off / toggle |
自动整理你的背包 |
/neatsort reload |
重新加载配置文件 |
/neatsort import |
导入 ChestSort 配置 |
/neatsort resetplayers |
清除所有玩家设置 |
别名:/nsort。
权限:neatsort.use、neatsort.inventory、neatsort.hotkey(默认均为 true),neatsort.admin(需 OP)。
诚实对比
ChestSort 的功能比本插件更多:包括设置 GUI、可编辑的分类文件、集成十余种其他插件、额外的热键等。如果你运行的是 Paper 1.21.x 且看重这些功能,ChestSort 在该版本上依然可用,且是一个更丰富的插件。
NeatSort 面向那些希望在新版 Minecraft 发布当天排序功能仍能正常工作的服务器。
开发备注
本插件的开发使用了 AI 辅助(由人类主导:需求分析、测试和发布决策均由维护者负责)。每次发布前都会在真实的 Paper 服务器上进行测试 —— 0.1.0 版本的运行测试在 Paper 1.21.11 和 26.2 上验证了 29 个运行时属性,并与其他 14 个插件共存,无任何错误。
采用 MIT 许可证。
人类主导开发:人类维护者指导、测试并对每次发布承担责任;AI 仅作为开发工具使用(根据 Modrinth 政策披露)。图标为手工制作的几何艺术作品,非 AI 生成。
NeatSort
Chest and inventory sorting for Paper servers — built so that a Minecraft update
cannot break it.
Tested on Paper 1.21.11, 26.2 and 26.3. One file, no dependencies.
Why this exists
ChestSort is the reference plugin for
this job — 299,530 downloads, 4.7 stars. Its last release is from October 2024.
We downloaded that release and started it ourselves on both current Paper versions:
- on Paper 1.21.11 it still works,
- on Paper 26.2 it fails to enable:
java.lang.ExceptionInInitializerError →
NumberFormatException: For input string: "build",
thrown from its bundled helper library while parsing the server version string.
It did not die in its sorting logic. It died in a version parser.
NeatSort is built to make that failure mode impossible:
- no bundled libraries, no NMS, no reflection into the server
- the server version string is never read or parsed
- no reference to any
Material or Tag constant in the categoriser —
items are grouped from Material.name() and the plain Bukkit predicates, so a
material added by a future Minecraft version falls into a catch-all category
instead of throwing. This is verified on every build: the test asserts that
categorisation holds for every material the server knows —
1,658 on Paper 1.21.11 and 1,691 on Paper 26.2.
The guarantee no other sorter gives
The worst thing a sorting plugin can do is lose a stack.
NeatSort builds the sorted layout in memory, counts every item type in the old and
the new layout, and only writes if both counts match exactly. If a single item
would go missing, nothing is written at all: the container is left untouched,
the console logs a warning, and the player is told. Unsorted beats one stack short.
Features
- Sorts chests, barrels, shulker boxes and ender chests on close (per-player toggle)
- Sorts the player inventory (hotbar excluded by default — your sword stays where
you put it)
- Middle-click inside an open container to sort it
- Merges partial stacks, respects stack limits, keeps named and enchanted items distinct
- Per-player settings persist across restarts
- Per-world disable list
- Only touches plain storage containers — never furnaces, brewing stands, anvils
or inventories held by another plugin (configurable blocklist for backpack,
vault and crate plugins)
Coming from ChestSort?
/neatsort import
Reads plugins/ChestSort/config.yml and takes over the settings that have an
equivalent here (auto-sort toggles, defaults, hotkeys, cooldown, disabled worlds).
Your ChestSort file is read only, never modified. What cannot be carried over is
reported instead of silently dropped — ChestSort's category text files and its
sorting-method string have no counterpart, because NeatSort sorts by a fixed,
version-proof rule rather than by editable material lists.
Commands
| Command |
Meaning |
/neatsort |
show your current settings |
/neatsort on / off / toggle |
auto-sort containers on close |
/neatsort inv |
sort your inventory now |
/neatsort inv on / off / toggle |
auto-sort your inventory |
/neatsort reload |
reload the config |
/neatsort import |
take over a ChestSort configuration |
/neatsort resetplayers |
clear all player settings |
Alias: /nsort.
Permissions: neatsort.use, neatsort.inventory, neatsort.hotkey (all default
true), neatsort.admin (op).
Honest comparison
ChestSort has more features than this: a settings GUI, editable category files,
hooks into a dozen other plugins, additional hotkeys. If you run Paper 1.21.x and
those matter to you, ChestSort still works there and is the richer plugin.
NeatSort is for servers that want sorting to keep working on the day a new
Minecraft version lands.
Development note
This plugin was developed with AI assistance (human-led: requirements, testing and
release decisions by the maintainer). It is tested on live Paper servers before
every release — the run for 0.1.0 asserted 29 runtime properties on Paper 1.21.11
and Paper 26.2, alongside 14 other plugins, with zero errors.
MIT licensed.
Human-led development: a human maintainer directs, tests and takes responsibility for every release; AI is used as a development tool (disclosed per Modrinth policy). The icon is hand-made geometric artwork, not AI-generated.
评论 0
登录后参与评分
还没有评论,来抢沙发吧