
MorayBanItem
一个封禁物品的插件,提供日志查询,全服广播等功能。/ A plugin for banning items, providing features such as log queries and server-wide broadcasts.
MorayBanItem - 物品封禁与反非法插件 / Item Ban & Anti-Illegal Plugin
插件介绍 / Introduction
MorayBanItem 是一个轻量级但功能强大的 Bukkit 物品封禁插件。它允许服务器管理员灵活地封禁特定物品,支持纯材质封禁和精确 NBT 封禁,并能自动检测并处理非法物品(如 32k 附魔、数量异常等),有效维护服务器经济与平衡。
MorayBanItem is a lightweight yet powerful Bukkit item banning plugin. It allows server administrators to flexibly ban specific items, supports pure material banning and precise NBT-based banning, and automatically detects and handles illegal items (such as 32k enchants, abnormal stack sizes, etc.), effectively maintaining server economy and balance.
混合端友好:针对 Youer 混合端做了特别优化,支持模组物品的封禁与补全。
Hybrid server friendly: Specially optimized for Youer hybrid servers, supporting mod item banning and tab completion.
功能特性 / Features
智能封禁系统 / Smart Ban System
- 纯材质封禁:封禁所有同材质的物品(如
minecraft:tnt)
Pure material ban: Ban all items of the same material (e.g.,minecraft:tnt) - NBT 原型封禁:仅封禁带有特定 NBT 数据的物品(通过
/mbi addhand添加手中物品)
NBT prototype ban: Ban only items with specific NBT data (add via/mbi addhand) - 封禁列表独立存储于
items.yml,与主配置分离,便于管理
Ban list stored separately initems.yml, independent from main config
非法物品检测 / Illegal Item Detection
- 自动检测并处理异常物品:
Automatically detects and handles abnormal items:- 超高附魔等级(可自定义阈值) / Excessive enchantment levels (customizable threshold)
- 数量异常(超过最大堆叠或 ≤0) / Abnormal stack sizes (exceeding max stack or ≤0)
- 无法破坏标签 / Unbreakable tag
- 可配置处理方式:删除(没收)或仅取消事件
Configurable action: delete (confiscate) or just cancel the event - 检测到非法物品时,支持全局广播和日志记录
Supports global broadcast and logging when illegal items are detected
便捷管理命令 / Easy Management Commands
- 提供完整的命令集,轻松管理封禁列表
Full command set for managing ban list - Tab 补全智能适配服务端类型(原版 Bukkit 使用注册表,Youer 使用反射获取所有物品)
Smart tab completion adapts to server type (uses registry for vanilla Bukkit, reflection for Youer to include all items)
实时监控与日志 / Real-time Monitoring & Logging
- 所有违规事件(非法或封禁物品)均记录到
logs/violations.log,包含玩家 UUID、物品 ID、数量及 NBT 提示
All violations (illegal or banned items) are logged tologs/violations.log, including player UUID, item ID, amount, and NBT hint - 可自定义全局广播消息
Customizable global broadcast messages
高性能设计 / High Performance
- 事件监听器轻量高效,仅检查必要属性
Lightweight event listeners, only check necessary properties - 配置缓存机制,减少磁盘 I/O
Config caching reduces disk I/O
命令列表 / Commands
| 命令 / Command | 说明 / Description |
|---|---|
/mbi help | 显示帮助信息 / Show help information |
/mbi reload | 重载配置文件(config.yml, message.yml, items.yml) / Reload config files |
/mbi info | 显示插件信息 / Display plugin information |
/mbi list | 列出所有被封禁的物品(含材质封禁和原型封禁) / List all banned items |
/mbi add <物品ID> | 添加纯材质封禁(支持命名空间ID,如 minecraft:tnt) / Add a pure material ban |
/mbi addhand | 将手中物品作为 NBT 原型加入封禁列表 / Add held item as NBT prototype ban |
/mbi remove <物品ID> | 移除纯材质封禁 / Remove a pure material ban |
/mbi removehand | 移除与手中物品匹配的封禁项(含材质和原型) / Remove ban entry matching held item |
权限节点 / Permissions
| 权限节点 / Permission | 说明 / Description | 默认 / Default |
|---|---|---|
moraybanitem.bypass | 绕过所有物品检查 / Bypass all item checks | op |
moraybanitem.command.reload | 重载插件配置 / Reload plugin config | op |
moraybanitem.command.info | 查看插件信息 / View plugin info | true |
moraybanitem.command.help | 查看帮助 / View help | true |
moraybanitem.command.list | 查看封禁列表 / View ban list | op |
moraybanitem.command.add | 添加材质封禁 / Add material ban | op |
moraybanitem.command.addhand | 添加手中物品 / Add held item | op |
moraybanitem.command.remove | 移除材质封禁 / Remove material ban | op |
moraybanitem.command.removehand | 移除手中物品对应的封禁 / Remove ban for held item | op |
配置文件 / Config Files
- config.yml:主配置文件,包含消息、非法检测开关及广播设置
Main config file, containing messages, illegal detection toggle, and broadcast settings - items.yml:独立封禁物品列表(使用命名空间ID作为键)
Separate ban list file (uses namespaced keys) - message.yml:语言文件,可自定义所有提示消息
Language file, all messages customizable
适用版本 / Supported Versions
- Bukkit / Spigot / Paper 1.20+
- 混合端:Youer(特别优化) / Hybrid server: Youer (specially optimized)
由 Morpe14514 开发 | 工作室QQ群:1081434103
Developed by Morpe14514 | Studio QQ Group: 1081434103
