Illegal Scanner
一款强大的 Paper 服务器反作弊工具 — 检测原版生存无法获得的超模、非法或可疑物品。
A powerful anti-cheat utility for Paper servers — detect illegal, overpowered, and suspicious items that cannot be obtained in vanilla survival.
Features / 功能
| Feature | 功能 |
|---|---|
| 7 validation engines covering enchantments, attributes, components, potions, books, fireworks & containers | 7 个校验引擎:附魔、属性修饰、数据组件、药水、书册、烟花、容器 |
| Progressive full-server scan — low TPS impact, resumable sessions | 渐进式全服扫描 — 低 TPS 影响,支持暂停/恢复 |
| Real-time monitor engine — event-driven detection of newly placed items | 实时监测引擎 — 事件驱动,自动检测新放置的物品 |
| Interactive GUI viewer — browse violations, teleport to locations, grab item snapshots | 交互式 GUI 查看器 — 浏览违规、传送定位、提取物品快照 |
| Text reports — chat-based paginated reports for every scan scope | 文本报告 — 聊天框分页报告,覆盖所有扫描范围 |
| 6 whitelist types — player, item, chunk, area, residence, world | 6 种白名单 — 玩家、物品、区块、区域、领地、世界 |
| Watch list — flag items by Material ID regardless of NBT | 监控列表 — 按 Material ID 标记物品,无视 NBT |
| Hot-reloadable config & messages — no restart needed | 配置/消息热重载 — 无需重启服务器 |
| Restricted item copying — GUI copy requires authorization | 受限物品复制 — GUI 复制物品需授权 |
| WorldGuard & Residence support — scan protected regions directly | WorldGuard / Residence 支持 — 直接扫描领地 |
Quick Start / 快速开始
# 1. Drop the jar into plugins/ and restart
# 将 jar 放入 plugins/ 并重启
# 2. Check the item in your hand
# 检查手中物品
/is check item
# 3. Scan the chunk you're standing in
# 扫描当前所在区块
/is scan chunk
# 4. Start a full-server scan
# 启动全服扫描
/is scan full
# 5. View results in GUI
# 在 GUI 中查看结果
/is view full
Requirements / 环境要求
| Requirement | 要求 |
|---|---|
| Paper 1.20.6+ | Server / 服务端 |
| Java 21+ | Java |
| SQLite (bundled, no setup needed / 内置,无需配置) | Storage / 存储 |
| WorldGuard, Residence (optional soft-depend / 可选软依赖) | Optional / 可选 |
Installation / 安装
- Download
illegal-scanner-1.2.4.jarfrom Releases. 从 Releases 下载illegal-scanner-1.2.4.jar。 - Place it in your server's
plugins/folder. 放入服务器的plugins/文件夹。 - Restart the server (or run
/reload confirm). 重启服务器(或执行/reload confirm)。 - Configuration and database auto-generate at
plugins/illegal-scanner/. 配置文件和数据库自动生成于plugins/illegal-scanner/。
Commands / 命令
All commands use /is (alias: /illegalscanner).
所有命令使用 /is(别名:/illegalscanner)。
Scan / 扫描 — illegalscanner.scan
| Command | Description |
|---|---|
/is scan chunk |
Scan current chunk / 扫描当前区块 |
/is scan player [-online|-offline|-all] [name] |
Scan player inventory / 扫描玩家背包 |
/is scan area <x1> <z1> <x2> <z2> [world] |
Scan rectangular area / 扫描矩形区域 |
/is scan res <region> |
Scan WorldGuard/Residence region / 扫描领地 |
/is scan world [world|all_world] [loaded|unloaded|all] |
Scan world chunks / 扫描世界区块 |
/is scan full |
Progressive full-server scan / 渐进式全服扫描 |
/is scan pause|resume|stop|restart <sessionId> |
Manage scan sessions / 管理扫描会话 |
Check / 快速检测 — illegalscanner.inspect
| Command | Description |
|---|---|
/is check item |
Validate held item (not recorded to DB) / 校验手中物品(不记录) |
/is check player [name] |
Check player inventory + ender chest / 检查玩家背包+末影箱 |
/is check chunk |
Quick chunk check (not recorded to DB) / 快速区块检查(不记录) |
View (GUI) / 查看(GUI) — illegalscanner.report
| Command | Description |
|---|---|
/is view chunk |
Current chunk violations / 当前区块违规 |
/is view player [name] |
Player violation list / 玩家违规列表 |
/is view world [world] |
World violation overview / 世界违规概览 |
/is view area <x1> <z1> <x2> <z2> [world] |
Area violation overview / 区域违规概览 |
/is view res <plugin> <region> [world] |
Region violation overview / 领地违规概览 |
/is view full |
Server-wide violation overview / 全服违规概览 |
/is view scan [sessionId] |
Scan session list/details / 扫描会话列表/详情 |
/is view record <SCAN|MONITOR> <id> |
Single violation record / 单条违规详情 |
/is view item [itemHash] |
Violation by item type / 按物品类型查看 |
Inventory (GUI) / 背包查看(GUI) — illegalscanner.report
| 命令 | 描述 |
|---|---|
/is inventory player [name] |
查看玩家背包、装备和末影箱(3页GUI,支持离线) |
/is inventory chunk [x z] [world] |
查看区块内所有容器(支持通过MCA查看离线/未加载区块) |
/is inventory world [world] |
浏览世界已加载区块中的所有容器 |
/is inventory container <x> <y> <z> |
只读查看方块容器(箱子、熔炉、漏斗等) |
/is inventory entity <selector> |
只读查看实体背包/装备(支持@e选择器及UUID) |
报告(文本) — illegalscanner.report
| 命令 | 描述 |
|---|---|
/is report chunk |
区块文本报告 |
/is report player <name> [page] |
玩家文本报告 |
/is report item [hash] [page] |
物品类型报告 |
/is report scan [sessionId] [page] |
扫描会话报告 |
/is report record <SCAN|MONITOR> <id> |
完整违规详情 |
/is report area <x1> <z1> <x2> <z2> [world] [page] |
区域文本报告 |
/is report res <plugin> <region> [world] [page] |
领地文本报告 |
/is report world [world] [page] |
世界文本报告 |
实时监测 — illegalscanner.admin
| 命令 | 描述 |
|---|---|
/is monitor enable|disable|status |
开关监测引擎 |
配置管理 — illegalscanner.admin
| 命令 | 描述 |
|---|---|
/is config reload |
重载配置、消息和监测 |
/is config list |
列出所有配置项 |
/is config rules ... |
动态调整检测规则 |
/is config monitor ... |
配置监测引擎参数 |
/is config scan ... |
配置扫描行为 |
白名单 — illegalscanner.admin
| 类型 | 描述 |
|---|---|
player |
白名单玩家 |
item |
白名单特定物品(按 hash) |
chunk |
白名单区块 |
area |
白名单坐标区域 |
res |
白名单领地 |
world |
白名单整个世界 |
监控列表 — illegalscanner.admin
| 命令 | 描述 |
|---|---|
/is watchlist add <materialID> |
添加 Material 到监控列表 |
/is watchlist remove <materialID> |
移除 Material |
/is watchlist list|clear |
列出或清空列表 |
其他
| 命令 | 描述 |
|---|---|
/is give <item_hash> |
根据 hash 生成物品(调试用) |
/is reload |
重载配置和消息 |
/is status |
服务状态概览 |
/is history chunk|player ... |
历史违规记录 |
权限
| 权限节点 | 范围 | 默认值 |
|---|---|---|
illegalscanner.admin |
所有命令(父节点) | OP |
illegalscanner.scan |
/is scan ... |
OP |
illegalscanner.report |
/is report, /is view, /is history |
OP |
illegalscanner.inspect |
/is check ... |
OP |
illegalscanner.notify |
接收管理员通知 | OP |
检测规则
该插件采用白名单原则:只要原版生存无法获得,就判定为非法。
1. 附魔校验器
- 等级超过原版上限(如锋利 VI)
- 互斥附魔共存(如精准采集 + 时运)
- 附魔不兼容物品类型(如剑上的效率)
- 重复附魔 ID
2. 属性修饰校验器
- 属性不在该物品类型的原版白名单中
- 属性值与原版不一致
- 槽位、UUID 或操作类型异常
3. 数据组件校验器
| 组件 | 严重级别 | 原因 |
|---|---|---|
unbreakable |
ILLEGAL | 仅创造模式/命令可用 |
lore |
ILLEGAL | 原版生存无来源 |
item_name |
ILLEGAL | 仅命令可覆写 |
custom_name > 50字符 |
ILLEGAL | 铁砧命名限制 |
custom_name 非斜体 |
ILLEGAL | 铁砧命名永久斜体 |
custom_name JSON注入 |
ILLEGAL | 包含 {"text":"..."} 模式 |
custom_name 零宽字符 |
SUSPICIOUS | Unicode控制字符 / 零宽空格等 |
can_place_on / can_destroy |
ILLEGAL | 冒险模式专属 |
max_stack_size 溢出 |
ILLEGAL | 超过原版堆叠上限 |
max_damage 不匹配 |
ILLEGAL | 与物品类型耐久不一致 |
custom_model_data |
SUSPICIOUS | 存在自定义模型数据 |
hide_tooltip |
SUSPICIOUS | 可能掩盖非法属性 |
4. 药水校验器
- 效果等级超标(默认最大 II 级 / amplifier=1)
- 持续时间超标(默认最大 8 分钟)
- 不可能的药水效果组合(瞬间伤害 + 瞬间治疗等)
- 未知效果 ID
- 自定义颜色但无对应效果
5. 书册校验器
- 页数超标(> 100)
- 单页过长(> 1000字符)
- 作者名过长(> 16字符)
- 标题过长(> 32字符)
6. 烟花校验器
- 飞行时间超标(> 3)
- 爆炸效果超标(> 10)
7. 容器校验器
- 递归检查潜影盒和收纳袋内容物
- 标记
container_loot组件(方块破坏后战利品表不保留)
严重级别
| 等级 | 含义 |
|---|---|
| ILLEGAL | 确定生存无法获得 — 需处理 / Definitely unobtainable in survival — action required |
| SUSPICIOUS | 建议人工审查 / Unusual characteristics — manual review recommended |
| PASS | 物品合法 / Item is clean |
配置 / Configuration
配置文件位于 plugins/illegal-scanner/config.yml,所有参数可通过 /is config 命令动态修改。
Config file: plugins/illegal-scanner/config.yml. All settings can be changed via /is config without restart.
关键配置项 / Key Settings
scan:
full_scan_enabled: true # 启动时自动全扫 / Auto-start full scan on boot
full_scan_chunks_per_tick: 1 # 每 tick 区块数(增加 = 更快,更高 TPS 开销) / Chunks per tick (increase = faster, higher TPS cost)
# 每 tick 区块数(增加 = 更快,更高 TPS 开销) / Chunks per tick (increase = faster, higher TPS cost)
thread_pool_size: 4 # 线程池大小 / Thread pool for parallel processing
scan_player_inventories: true # 扫描玩家背包 / Scan player inventories
scan_player_enderchests: true # 扫描末影箱 / Scan player ender chests
scan_shulker_boxes: true # 扫描潜影盒 / Scan shulker box contents
scan_item_frames: true # 扫描物品展示框 / Scan item frames
scan_armor_stands: true # 扫描盔甲架 / Scan armor stands
validation:
enforce_max_levels: true # 附魔等级限制 / Enforce enchant max levels
enforce_conflicts: true # 附魔冲突检测 / Enforce enchant conflicts
enforce_item_compatibility: true # 附魔兼容性检测 / Enforce enchant compatibility
flag_unbreakable: true # 标记不可破坏物品 / Flag unbreakable items
flag_lore_presence: true # 标记含 lore 物品 / Flag lore-bearing items
flag_item_name_presence: true # 标记被覆写名称的物品 / Flag renamed items
custom_name_max_length: 50 # 铁砧命名最大长度 / Max custom name length
enforce_stack_limits: true # 堆叠限制检测 / Enforce stack limits
enforce_attribute_limits: true # 属性修饰限制 / Enforce attribute limits
potion_max_amplifier: 1 # 药水最大效果等级 / Max potion amplifier
potion_max_duration_ticks: 9600 # 药水最大持续时间 / Max potion duration
potion_max_effects: 5 # 单药水最大效果数 / Max effects per potion
book_max_pages: 100 # 书册最大页数 / Max book pages
firework_max_flight: 3 # 烟花最大飞行时间 / Max firework flight
firework_max_explosions: 10 # 烟花最大爆炸数 / Max firework explosions
monitor:
enabled: false # 实时监测开关 / Enable real-time monitor
interval_seconds: 5 # 扫描间隔 / Scan interval
flush_seconds: 300 # 去重窗口 / Dedup window
retention_days: 7 # 数据保留天数 / Data retention
alerts:
console_log: true # 控制台输出违规 / Log violations to console
console_log_severity: "ILLEGAL" # ILLEGAL | SUSPICIOUS | ALL
admin_notify: false # 通知在线管理员 / Notify online admins
数据库 / Database
数据库位于 plugins/illegal-scanner/items.db,常用查询:
SQLite database at plugins/illegal-scanner/items.db. Useful queries:
-- 活跃非法物品 / Active illegal items
SELECT id, item_type, player_name, severity
FROM illegal_items WHERE resolved = 0 ORDER BY last_detected DESC;
-- 按玩家统计 / Count by player
SELECT player_name, COUNT(*) as cnt
FROM illegal_items WHERE resolved = 0 AND location_type = 'PLAYER'
GROUP BY player_name ORDER BY cnt DESC;
-- 物品快照(用于还原) / Item snapshot for restoration
SELECT item_snapshot FROM illegal_items WHERE id = 1;
常见问题 / FAQ
Q: 会影响 TPS 吗? / Does this affect server TPS?
A: 默认扫描速率(1 区块/tick)TPS 影响 <5%。事件监听的单物品校验 <1ms。可根据硬件调整配置。
Default scan rate (1 chunk/tick) has <5% TPS impact. Single-item validation in event listeners takes <1ms. Adjust full_scan_chunks_per_tick and thread_pool_size for your hardware.
Q: 离线玩家如何扫描? / How are offline players scanned?
A: 插件读取 world/playerdata/<uuid>.dat 文件。使用 /is scan player -offline <name> 按需扫描。
The plugin reads world/playerdata/<uuid>.dat NBT files. Use /is scan player -offline <name> for on-demand scanning.
Q: 能从快照恢复物品吗? / Can I restore items from the snapshot?
A: 可以!使用 /is give <item_hash> 从存储的快照完整还原物品。
Yes! Use /is give <item_hash> to recreate the exact item from its stored snapshot.
Q: 如何避免合法插件物品误报? / How do I prevent false positives from legitimate plugin items? A: 四种方式 / Four options:
- 动态调整规则 / Tune rules dynamically:
/is config rules ... - 白名单特定物品 / Whitelist specific items:
/is whitelist item add - 白名单玩家 / Whitelist players:
/is whitelist player add <name> - 用监控列表仅追踪特定物品 / Use watch list to only monitor specific materials
Q: 监控列表和物品白名单的区别? / Watch list vs item whitelist? A: 白名单让特定 hash 完全跳过检查。监控列表标记所有匹配 Material 的物品(无视 NBT),用于追踪特定物品类型的分布。 Whitelist skips a specific hash entirely. Watch list flags all items of a Material regardless of NBT — use it to track distribution of specific item types.
Q: 支持 BungeeCord/Velocity 吗? / Does it support BungeeCord/Velocity? A: 这是 Bukkit/Paper 插件,安装于每个子服即可,不支持代理端。 This is a Bukkit/Paper plugin — install on each backend server. Not supported on proxy.
Q: 支持的 Minecraft 版本? / Supported Minecraft versions? A: 编译目标为 Paper 1.20.6,更新版本可能可用但未测试。 Built targeting Paper 1.20.6. May work on newer versions but is untested.
链接 / Links
- 源码 / Source Code: GitHub
- 问题反馈 / Issues: GitHub Issues
- 下载 / Releases: GitHub Releases
许可证 / License
保留所有权利。详见仓库许可证。 All rights reserved. See the repository for license details.
你是这个资源的作者?登录后可认领此资源。
相似资源
ExyliaPlugins 的库。
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
创建用户友好的菜单以前往不同的世界
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
一个高度兼容、功能完善且稳定的 TPA 模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧