致谢与修改说明
本插件基于 Programie 开发的原始 ItemSorter 插件。
本项目并非完全重写。
它是通过对原始源代码进行研究和分析后,对原始插件进行修改和扩展的版本。
此分支的主要目标是提高 稳定性、可读性 和 可用性,以适用于现实世界中的服务器,特别是具有复杂存储系统的中型至大型生存服务器。
已修改和改进的内容
- 重构了部分代码以提高整体稳定性并减少不必要的负载
- 改进了告示牌与箱子连接的处理方式,以更好地支持大规模存储设置
- 降低了在使用大量告示牌或大型多箱系统时出现 TPS(每秒刻数)下降的风险
- 清理并重新组织了文档,使其更清晰易懂
- 优化了配置、权限及使用说明的措辞和结构
- 专注于使插件更适合服务器的长期使用
本版本的目标
此修改版侧重于:
- 长期稳定性
- 对大型存储系统的更好支持
- 清晰且结构良好的文档
- 方便玩家和服务器管理员使用
所有核心思想和原始概念均归属于原作者。
本项目仅旨在作为针对特定用例的优化和完善延续。
ItemSorter 是一款 Minecraft Bukkit 插件,旨在通过将物品从源容器(如箱子或漏斗)转移到目标容器中,实现物品整理的自动化。玩家可以利用告示牌配置排序行为,从而无需红石或复杂设置即可高效地将物品路由到正确的存储位置。该插件支持多箱目标、排序优先级、可配置的传输速度以及可选的距离或世界限制等功能,既适合小型生存服务器,也适用于大型高性能存储系统。
配置
以下选项可在插件的 config.yml 中进行配置(首次加载时创建):
allow-cross-world-connections
允许在不同世界之间连接告示牌(例如,从下界向主世界传输物品)
(布尔值 / false,默认值:false)``
max-distance
源箱子与目标箱子之间的最大距离
(0 = 无限制,默认值:100)
max-names-per-player
每个玩家可用的不同名称的最大数量
(0 = 无限制,默认值:0)
max-signs-per-name
每个名称对应的最大告示牌数量
(0 = 无限制,默认值:0)
allow-multi-chests
允许单个目标告示牌连接多个箱子
(默认值:true)
max-multi-chests-blocks
用于多箱功能的箱子方块的最大数量
(0 = 无限制,默认值:0)
transfer-single-item-per-interval
控制每次间隔是否只传输单个物品(true)还是整组物品(false)
(默认值:true)
transfer-interval
检查并传输物品的间隔时间(单位:刻)
(默认值:10)
权限
itemsorter.create
允许创建和销毁自己的 ItemSorter 告示牌
(默认:所有人)
itemsorter.destroyAny
允许销毁任何 ItemSorter 告示牌(不仅仅是自己的)
(默认:op)
itemsorter.command
允许执行 /itemsorter 命令
(默认:op)
itemsorter.*
允许访问所有 ItemSorter 功能
(默认:op)
如何使用?
只需在任何你想用作 源箱子 的容器方块(箱子、桶、漏斗等)侧面放置一个告示牌,并包含以下内容:
- 第一行:
[ItemSource]
- 第二行:其他连接箱子使用的任意唯一名称
这将把该箱子定义为物品来源(即你放入物品供插件进行整理的箱子)。
随后,在任何你想用作 目标箱子 的容器方块(箱子、桶、漏斗等)侧面放置一个告示牌,并包含以下内容:
- 第一行:
[ItemTarget]
- 第二行:其他连接箱子使用的任意唯一名称
这将把该箱子定义为物品目标(即你的物品将被移动到的箱子)。
接下来,将你想要整理的物品放入目标箱子中。
例如,如果你想将圆石移动到箱子中,只需在箱子中至少放入一块圆石物品。
之后,你就可以开始使用了。
现在你可以将玩家背包中的任何物品移动到源箱子中,插件将尝试为每种物品找到正确的目标箱子。
任何无法整理到目标箱子的剩余物品将保留在源箱子中。
这里有一个简短的视频演示该插件:
目标顺序
在某些情况下,你可能拥有多个用于同一种类物品(如圆石或泥土)的箱子。
在这种情况下,你可能希望定义哪个箱子应该先被填满,然后再尝试下一个。
要实现这种目标箱子的顺序,只需在连接到目标箱子的告示牌的 第四行 使用 o:任意数字 来定义顺序。

示例
- 第一行:
[ItemTarget]
- 第二行:其他连接箱子使用的任意唯一名称
- 第三行:保持空白(将被替换为你的玩家名称)
- 第四行:
o:10
较小的数字表示该箱子会在具有较大数字的箱子之前被使用。
默认情况下,任何未设置顺序选项的目标箱子都将具有顺序号 0。
如果你定义了多个具有相同顺序号的箱子,这些箱子的使用顺序可能是随机的。
单个目标告示牌连接多个箱子
有时,你可能会发现放置大量告示牌非常耗时,而且还会降低客户端的渲染性能(例如,如果你的储藏室里有成百上千个告示牌)。
考虑以下设置:

在这种情况下,你可以使用此插件内置的另一个功能。
只需在任何箱子上放置一个目标告示牌,并在其第四行添加 mc("Multi Chests" 的缩写)。
所有直接相连的箱子现在都会通过这个目标告示牌进行连接。
示例
- 第一行:
[ItemTarget]
- 第二行:其他已连接箱子使用的唯一名称
- 第三行:保持空白(将被替换为你的玩家名称)
- 第四行:
mc
你还可以通过用逗号分隔每个选项来指定其他选项,例如目标顺序。
示例
- 第一行:
[ItemTarget]
- 第二行:其他已连接箱子使用的唯一名称
- 第三行:保持空白(将被替换为你的玩家名称)
- 第四行:
o:10,mc
在箱子上放置该告示牌后,你可以连接任意数量的箱子(受配置项 max-multi-chests-blocks 限制)。
你只需要确保它们在任意方块侧面相互接触即可。
之前的设置将如下所示:

这八个箱子都使用相同的名称 some name 进行连接,就像在每个箱子上放置目标告示牌一样。
显示告示牌信息
点击物品整理器告示牌(左键或右键单击)会显示关于该告示牌的信息,以及它与其他告示牌/箱子的连接情况。
命令
该插件只有一个命令 /itemsorter,包含多个子命令(操作)。
可用操作
remove-signs <player name> <sign name>
移除指定玩家的指定名称的所有告示牌
Credits & Modification
This plugin is based on the original ItemSorter plugin developed by Programie.
This project is not a complete rewrite.
It is a modified and extended version of the original plugin, created after studying and analyzing the original source code.
The main goal of this fork is to improve stability, readability, and usability for real-world servers, especially medium to large survival servers with complex storage systems.
What has been modified and improved
- Refactored parts of the code to improve overall stability and reduce unnecessary load
- Improved handling of signs and chest connections to better support large storage setups
- Reduced the risk of TPS drops when using many signs or large multi-chest systems
- Cleaned up and reorganized documentation to make it clearer and easier to understand
- Improved wording and structure of configuration, permissions, and usage instructions
- Focused on making the plugin more suitable for long-term server usage
Goal of this version
This modified version focuses on:
- Long-term stability
- Better support for large storage systems
- Clear and well-structured documentation
- Ease of use for both players and server administrators
All core ideas and the original concept belong to the original author.
This project is intended solely as an optimized and refined continuation for specific use cases.
ItemSorter is a Minecraft Bukkit plugin designed to automate item organization by transferring items from a source inventory (such as chests or hoppers) into one or more target inventories based on item type. Players can configure sorting behavior using signs, allowing items to be routed efficiently into the correct storage without redstone or complex setups. The plugin supports features such as multi-chest targets, sorting priority, configurable transfer speed, and optional distance or world limitations, making it suitable for both small survival servers and large, high-performance storage systems.
Configuration
The following options can be configured in the config.yml of the plugin (created on the first load):
allow-cross-world-connections
Allow to connect signs between worlds (e.g. transfer items from the Nether to the Overworld)
(true / false, default: false)``
max-distance
The maximum distance between source and target chests
(0 = unlimited, default: 100)
max-names-per-player
The maximum number of different names per player
(0 = unlimited, default: 0)
max-signs-per-name
The maximum number of signs per name
(0 = unlimited, default: 0)
allow-multi-chests
Allow multiple chests connected to a single target sign
(default: true)
max-multi-chests-blocks
The maximum number of chest blocks used for the multi-chest feature
(0 = unlimited, default: 0)
transfer-single-item-per-interval
Controls whether only a single item (true) or the whole stack (false) is transferred per interval
(default: true)
transfer-interval
Interval (in ticks) at which items are checked and transferred
(default: 10)
Permissions
itemsorter.create
Allow to create and destroy your own ItemSorter signs
(Default: everyone)
itemsorter.destroyAny
Allow to destroy any ItemSorter signs (not just your own)
(Default: op)
itemsorter.command
Allow to execute the /itemsorter command
(Default: op)
itemsorter.*
Allow access to all ItemSorter features
(Default: op)
How to use it?
Simply place a sign at the side of any inventory block (chest, barrel, hopper, etc.) you would like to use as the source chest containing the following content:
- First line:
[ItemSource]
- Second line: Any unique name used by the other connected chests
This will define the chest as an item source (i.e. the chest you will put your items into for the plugin to sort them).
After that, place a sign at the side of any inventory block (chest, barrel, hopper, etc.) you would like to use as the target chest containing the following content:
- First line:
[ItemTarget]
- Second line: Any unique name used by the other connected chests
This will define the chest as an item target (i.e. the chest your items will be moved to).
Next, place any item you would like to sort into the target chest.
For example, if you want to move cobblestone into the chest, simply place at least one cobblestone item into the chest.
After that, you are ready to go.
You may now move any item from your player inventory into the source chest, and the plugin will try to find the correct target chest for each item.
Any remaining items which can't be sorted into a target chest will remain in the source chest.
Here is a short video demonstrating the plugin:
Target order
At some point, you might have multiple chests for a single item type such as cobblestone or dirt.
In that case, you may want to define which chest should be filled first before trying the next one.
To achieve this type of target chest order, simply define the order using o:any number on the fourth line of the sign attached to the target chest.

Example
- First line:
[ItemTarget]
- Second line: Any unique name used by the other connected chests
- Third line: Keep empty (will be replaced with your player name)
- Fourth line:
o:10
A lower number means the chest is used before another with a higher number.
By default, any target chest without the order option will have the order number 0.
If you define multiple chests with the same order number, the order of those chests might be random.
Multiple chests with a single target sign
Sometimes, you might get to the point where placing lots of signs is really time-consuming and could also decrease the client rendering performance (e.g. if there are hundreds of signs in your storage room).
Think about the following setup:

In that case, you can use another feature built into this plugin.
Simply place a single target sign on any chest and add mc (short for "Multi Chests") to the fourth line of it.
Any directly connected chests are now connected equally with this target sign.
Example
- First line:
[ItemTarget]
- Second line: Any unique name used by the other connected chests
- Third line: Keep empty (will be replaced with your player name)
- Fourth line:
mc
You may also specify other options like the target order by separating each option with a comma.
Example
- First line:
[ItemTarget]
- Second line: Any unique name used by the other connected chests
- Third line: Keep empty (will be replaced with your player name)
- Fourth line:
o:10,mc
Placing that sign on a chest allows you to connect as many chests as you want (limited by the max-multi-chests-blocks config option).
You only have to make sure they are touching each other on any block side.
The previous setup would look like that:

All of those eight chests are connected using the same name some name, just like placing a target sign on each of them.
Show info about sign
Clicking on an ItemSorter sign (left or right click) shows some information about the sign as well as its connection to the other signs/chests.
Commands
The plugin has a single command /itemsorter with multiple subcommands (actions).
Available actions
remove-signs <player name> <sign name>
Remove all signs with the specified name of the specified player
评论 0
登录后参与评分
还没有评论,来抢沙发吧