Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
ServerItemManager
一款用于管制服务器物品的 Bukkit 插件:既能封禁特定材质与特定 NBT 的物品,也能自动检测并清理非法物品。
A Bukkit plugin for controlling items on your server: it can ban items by material or by exact NBT data, and it automatically detects and removes illegal items.
- 插件名 / Plugin name:
ServerItemManager - 主命令 / Main command:
/sim(完整写法/serveritemmanager) - 作者 / Author:Morpe14514
简体中文
功能特性
1. 物品管制
- 纯材质管制:管制某个材质的全部物品,无论 NBT 是否相同(如
minecraft:tnt) - 原型管制:只管制带有特定 NBT 的物品,使用
/sim addhand将手中物品连同 NBT 一起加入管制 - 单独绕过权限:每个管制项都可以配置独立的绕过权限,拥有该权限的玩家不受对应物品限制
- 全局绕过权限:
serveritemmanager.bypass可一次性绕过所有管制
2. 非法物品检测
- 超限附魔等级(阈值可配置,设为 0 可关闭该项检测)
- 数量异常(超过最大堆叠或 ≤ 0)
- 无法破坏(Unbreakable)标签
- 处理方式可选:
delete(直接删除物品)或cancel(仅取消本次操作)
3. 拦截场景
| 事件 | 说明 |
|---|---|
| 拾取物品 | 阻止玩家捡起管制/非法物品 |
| 合成物品 | 阻止合成产物为管制/非法物品 |
| 使用物品 | 阻止使用或放置管制/非法物品 |
| 背包点击 | 阻止在容器与背包中拿取、移动管制/非法物品 |
4. 违规记录
- 所有拦截记录写入
plugins/ServerItemManager/logs/violations-YYYY-MM-DD.log - 按天分文件,记录时间、类型、玩家、物品 ID、显示名与数量
- 可通过
log-enabled: false一键关闭
5. 便捷管理
- 完整子命令 + Tab 补全(支持命名空间 ID,含模组物品)
add与remove的补全列表会按已输入内容过滤,并自动剔除无效的LEGACY_*材质- 消息文本全部集中在
message.yml,支持&颜色代码
命令列表
| 命令 | 说明 | 权限 |
|---|---|---|
/sim help |
显示帮助 | serveritemmanager.command.help |
/sim reload |
重载 config.yml、message.yml、items.yml |
serveritemmanager.command.reload |
/sim info |
显示插件信息 | serveritemmanager.command.info |
/sim list |
列出当前全部管制项(纯材质 + 原型) | serveritemmanager.command.list |
/sim add <物品ID> [权限] |
添加纯材质管制,可附带单独绕过权限 | serveritemmanager.command.add |
/sim addhand [权限] |
将手中物品连同 NBT 加入管制(原型管制) | serveritemmanager.command.addhand |
/sim remove <物品ID> |
移除该物品的全部管制(纯材质 + 原型) | serveritemmanager.command.remove |
/sim removehand |
移除与手中物品精确匹配的管制项 | serveritemmanager.command.removehand |
物品 ID 使用命名空间格式,例如
minecraft:tnt、mtr:railway_sign。
权限节点
| 权限 | 说明 | 默认 |
|---|---|---|
serveritemmanager.bypass |
绕过所有管制物品检查(全局) | op |
serveritemmanager.command.help |
查看帮助 | true |
serveritemmanager.command.info |
查看插件信息 | true |
serveritemmanager.command.reload |
重载配置 | op |
serveritemmanager.command.list |
查看管制列表 | op |
serveritemmanager.command.add |
添加材质管制 | op |
serveritemmanager.command.addhand |
添加手中物品 | op |
serveritemmanager.command.remove |
移除材质管制 | op |
serveritemmanager.command.removehand |
移除手中物品对应的管制 | op |
物品级别的绕过权限不需要在 plugin.yml 中声明,直接写在 items.yml 的 permission 字段即可。
配置文件
config.yml
controlled-item-check:
enabled: true # 管制检测总开关
message: "&c此物品已被服务器管制,请联系管理员!"
broadcast:
enabled: true # 是否广播
message: "&e玩家 {player} 持有被管制的物品 {item} (数量: {amount}),操作已阻止!"
illegal-item-check:
enabled: true # 非法物品检测总开关
max-enchant-level: 10 # 最大附魔等级,0 表示不检测附魔
check-stack-size: true # 检测数量异常
check-unbreakable: false # 检测无法破坏标签
action: delete # delete / cancel
message: "&c检测到非法物品,已被自动清除!"
broadcast:
enabled: true
message: "&e玩家 {player} 持有非法物品 {item} (数量: {amount}),已被自动处理!"
log-enabled: true # 是否写入违规日志
items.yml
controlled-items:
minecraft:tnt: {} # 纯材质管制
minecraft:end_crystal: # 纯材质管制 + 单独绕过权限
permission: "serveritemmanager.bypass.end_crystal"
原型管制条目由 /sim addhand 自动生成,包含序列化后的物品数据。同一材质存在多个原型时,插件会自动追加 #序号 后缀(如 minecraft:diamond_sword#2),解析时自动忽略该后缀,请勿手动维护。
message.yml
所有面向玩家与命令发送者的文本都在这里,支持 & 颜色代码,改完执行 /sim reload 即可生效。
安装
- 确认服务端为 Bukkit / Spigot / Paper 1.20 及以上(Java 17+)
- 将
ServerItemManager-x.x.x.jar放入服务端的plugins/目录 - 启动服务端,首次启动会把 bstats 依赖下载到服务端根目录的
libraries/(需要联网一次),同时在plugins/ServerItemManager/下生成默认配置 - 按需编辑配置,执行
/sim reload重载
构建
mvn clean package
产物为 target/ServerItemManager-<版本>.jar。jar 本体不含任何第三方代码:bstats 在 plugin.yml 的 libraries 中声明,由服务端首次启动时下载到服务端自己的 libraries/ 目录,因此不会在插件目录下生成多余文件,也不会与其他插件冲突。
版本号只在 pom.xml 的 <version> 中维护,plugin.yml 使用 ${project.version} 由 Maven 在构建时自动替换,无需两处手改。
兼容性
- Bukkit / Spigot / Paper 1.20+
- Folia:已声明
folia-supported: true,事件监听全部在玩家所在区域线程中执行 - 混合端(Mohist / Youer):启动时会自动识别服务端类型并输出到控制台
- 模组物品:只要服务端注册了对应材质,即可通过命名空间 ID 进行管制与补全
隐私说明
插件使用 bStats(插件 ID 30253)收集匿名的服务端类型、在线人数等统计信息,不含玩家数据。依赖通过 plugin.yml 的 libraries 声明,由服务端首次启动时下载到 libraries/ 目录;若下载失败,插件只会在控制台提示并跳过统计,不影响其他功能。可在 plugins/bStats/config.yml 中关闭。
联系方式
- 作者:Morpe14514
- 交流群:1085808257
English
Features
1. Item control
- Material control — blocks every item of a given material regardless of NBT (e.g.
minecraft:tnt) - Prototype control — blocks only items matching specific NBT data; use
/sim addhandto add the item in your hand together with its NBT - Per-item bypass permission — each controlled entry can define its own bypass permission
- Global bypass permission —
serveritemmanager.bypassbypasses every check at once
2. Illegal item detection
- Enchantment levels above a configurable threshold (set to
0to disable this check) - Abnormal stack size (greater than max stack size, or ≤ 0)
Unbreakabletag- Action is configurable:
delete(remove the item) orcancel(only cancel the action)
3. Interception points
| Event | Behaviour |
|---|---|
| Item pickup | Prevents players from picking up controlled / illegal items |
| Crafting | Blocks results that are controlled / illegal |
| Item usage | Blocks using or placing controlled / illegal items |
| Inventory click | Blocks taking or moving controlled / illegal items in containers and inventories |
4. Violation log
- Every interception is written to
plugins/ServerItemManager/logs/violations-YYYY-MM-DD.log - One file per day, recording time, type, player, item ID, display name and amount
- Can be disabled with
log-enabled: false
5. Management convenience
- Full sub-command set with tab completion (namespace IDs supported, including modded items)
- Completion lists for
addandremoveare filtered by your current input and automatically exclude the uselessLEGACY_*materials - All user-facing texts live in
message.ymland support&colour codes
Commands
| Command | Description | Permission |
|---|---|---|
/sim help |
Show help | serveritemmanager.command.help |
/sim reload |
Reload config.yml, message.yml, items.yml |
serveritemmanager.command.reload |
/sim info |
Show plugin information | serveritemmanager.command.info |
/sim list |
List all controlled entries (material + prototype) | serveritemmanager.command.list |
/sim add <item id> [permission] |
Add a material control, optionally with a bypass permission | serveritemmanager.command.add |
/sim addhand [permission] |
Add the item in hand including its NBT (prototype control) | serveritemmanager.command.addhand |
/sim remove <item id> |
Remove all controls of that material (material + prototype) | serveritemmanager.command.remove |
/sim removehand |
Remove the entry that exactly matches the item in hand | serveritemmanager.command.removehand |
Item IDs use the namespaced format, e.g.
minecraft:tntormtr:railway_sign.
Permissions
| Permission | Description | Default |
|---|---|---|
serveritemmanager.bypass |
Bypass every controlled-item check (global) | op |
serveritemmanager.command.help |
View help | true |
serveritemmanager.command.info |
View plugin information | true |
serveritemmanager.command.reload |
Reload configuration | op |
serveritemmanager.command.list |
View the controlled list | op |
serveritemmanager.command.add |
Add material controls | op |
serveritemmanager.command.addhand |
Add the item in hand | op |
serveritemmanager.command.remove |
Remove material controls | op |
serveritemmanager.command.removehand |
Remove the control matching the item in hand | op |
Per-item bypass permissions do not need to be declared in plugin.yml; simply write them into the permission field of items.yml.
Configuration
config.yml
controlled-item-check:
enabled: true # master switch for item control
message: "&cThis item is controlled by the server, please contact an administrator!"
broadcast:
enabled: true # whether to broadcast
message: "&ePlayer {player} tried to use controlled item {item} (amount: {amount}); the action was blocked!"
illegal-item-check:
enabled: true # master switch for illegal item detection
max-enchant-level: 10 # max allowed enchantment level, 0 disables the enchantment check
check-stack-size: true # detect abnormal stack sizes
check-unbreakable: false # detect the Unbreakable tag
action: delete # delete / cancel
message: "&cAn illegal item was detected and removed automatically!"
broadcast:
enabled: true
message: "&ePlayer {player} had illegal item {item} (amount: {amount}); it was handled automatically!"
log-enabled: true # whether to write the violation log
items.yml
controlled-items:
minecraft:tnt: {} # material control
minecraft:end_crystal: # material control + per-item bypass permission
permission: "serveritemmanager.bypass.end_crystal"
Prototype entries are generated automatically by /sim addhand and contain serialized item data. When several prototypes share the same material, the plugin appends a #index suffix (e.g. minecraft:diamond_sword#2); the suffix is stripped when loading, so never edit it manually.
message.yml
Every text shown to players and command senders is defined here, with & colour code support. Run /sim reload after editing.
Installation
- Make sure your server is Bukkit / Spigot / Paper 1.20 or newer (Java 17+)
- Drop
ServerItemManager-x.x.x.jarinto the server'splugins/folder - Start the server; on first startup the bStats library is downloaded into the server's
libraries/folder (needs internet access once) and default configuration files are generated underplugins/ServerItemManager/ - Edit the configuration as needed and run
/sim reload
Building
mvn clean package
The output is target/ServerItemManager-<version>.jar. The jar itself contains no third-party code: bStats is declared in plugin.yml under libraries, so the server downloads it into the server's own libraries/ folder on first startup.
The version number is maintained only in pom.xml; plugin.yml uses ${project.version}, which Maven replaces automatically during the build.
Compatibility
- Bukkit / Spigot / Paper 1.20+
- Folia:
folia-supported: trueis declared; all listeners run on the region thread that owns the player - Hybrid servers (Mohist / Youer): the server type is detected on startup and printed to the console
- Modded items: as long as the material is registered on the server, it can be controlled and completed by its namespace ID
Privacy
The plugin uses bStats (plugin ID 30253), which only reports anonymous statistics such as server type and player count — no player data. The dependency is declared in plugin.yml under libraries and downloaded by the server into libraries/ on first startup; if the download fails, the plugin logs a warning and simply skips statistics. You can disable it in plugins/bStats/config.yml.
Contact
- Author: Morpe14514
- Community group (QQ): 1085808257


