ModDetector
基于数据包层面的作弊模组检测,适用于 Minecraft 服务器。通过利用翻译键漏洞来识别不允许的客户端修改——无需任何客户端代理。
工作原理
该插件利用 Minecraft 的告示牌编辑流程来探测客户端的翻译表。如果安装了模组,它会用自己的字符串替换翻译键——从而暴露其存在。
检测流程(在连接时):
- 发送一个
BlockUpdatePacket 在玩家附近放置一个虚拟告示牌
- 发送一个
OpenSignEditorPacket,在客户端打开告示牌编辑器
- 发送一个
SignUpdatePacket,其中包含模组的翻译键作为告示牌文本
- 客户端将告示牌内容回显回来——如果值与默认回退值不同,则说明存在该模组
整个握手过程对玩家不可见,且在连接时静默发生。不会显示 GUI,检测过程中也不会发送聊天消息。
已检测的模组
以下模组开箱即用即被屏蔽。你可以在 config.yml 中扩展列表。
| Mod |
Translation Key |
| Meteor Client |
key.meteor-client.open-gui |
| Item Scroller |
itemscroller.gui.button.config_gui.generic |
| Freecam |
key.freecam.toggle |
| Accurate Block Placement |
text.autoconfig.accurateblockplacement.title |
配置
所有设置都位于 plugins/ModDetector/config.yml 中。
# 用于检测模组存在的回退值
default: "fallb"
# 检测到模组时向玩家显示的消息
# 支持 MiniMessage、现代 & 和传统 ampersand 代码
kick-message:
- "&cYou are using a cheat mod that is not allowed on [Your Server] (%mod%!), if you join"
- "with this again you will be banned!"
# 要检测的模组翻译键
disallowed-mods:
"Meteor": "key.meteor-client.open-gui"
"Item Scroller": "itemscroller.gui.button.config_gui.generic"
"Freecam": "key.freecam.toggle"
"Accurate Block Placement": "text.autoconfig.accurateblockplacement.title"
# 启用数据包和结果日志记录以便调试
debug: false
颜色代码支持
kick-message 字段支持所有三种 Minecraft 颜色系统:
- MiniMessage —
<red>, <#ff4455>
- 现代 ampersand —
&c, &#ff4455
- 传统 ampersand —
&c, &x&f&f&4&4&5&5
添加自定义模组
任何注册了 Minecraft 翻译键的模组都可以被检测。在模组的语言文件中找到该键(通常在 assets/<modid>/lang/en_us.json 中),并将其添加到 disallowed-mods:
disallowed-mods:
"Your Mod Name": "your.mod.translation.key"
注意: default 字段必须设置为一个 永远不会 是有效翻译输出的字符串——默认的 "fallb" 对于原版客户端是安全的。除非你理解检测逻辑,否则不要更改它。
要求
| Requirement |
Version |
| Paper / Spigot |
1.19+ |
| PacketEvents |
Latest |
| Java |
17+ |
安装
- 下载并将
ModDetector.jar 放入你的 plugins/ 文件夹
- 下载 PacketEvents 并同样将其放入
plugins/
- 启动服务器——
config.yml 将自动生成
- 编辑
config.yml 以配置踢出消息和禁止的模组
- 使用
/reload 重新加载或重启服务器
灵感来源于 PvPClub 的检测方法。
ModDetector
Packet-level cheat mod detection for Minecraft servers. Identifies disallowed client modifications using a translation key exploit — without any client-side agent.
How it works
The plugin exploits Minecraft's sign editing flow to probe the client's translation table. If a mod is installed, it replaces translation keys with its own strings — betraying its presence.
Detection flow (at connection time):
- A
BlockUpdatePacket is sent to place a virtual sign near the player
- An
OpenSignEditorPacket is sent, opening the sign editor on the client
- A
SignUpdatePacket is sent containing the mod's translation key as the sign text
- The client echoes the sign content back — if the value differs from the default fallback, the mod is present
The entire handshake is invisible to the player and occurs silently at connection time. No GUI is shown, no chat messages are sent during detection.
Detected mods
The following mods are blocked out of the box. You can extend the list in config.yml.
| Mod |
Translation Key |
| Meteor Client |
key.meteor-client.open-gui |
| Item Scroller |
itemscroller.gui.button.config_gui.generic |
| Freecam |
key.freecam.toggle |
| Accurate Block Placement |
text.autoconfig.accurateblockplacement.title |
Configuration
All settings live in plugins/ModDetector/config.yml.
# Fallback value used to detect mod presence
default: "fallb"
# Message shown to the player on detection
# Supports MiniMessage, modern & legacy ampersand codes
kick-message:
- "&cYou are using a cheat mod that is not allowed on [Your Server] (%mod%!), if you join"
- "with this again you will be banned!"
# Mod translation keys to detect
disallowed-mods:
"Meteor": "key.meteor-client.open-gui"
"Item Scroller": "itemscroller.gui.button.config_gui.generic"
"Freecam": "key.freecam.toggle"
"Accurate Block Placement": "text.autoconfig.accurateblockplacement.title"
# Enable packet & result logging for debugging
debug: false
Color code support
The kick-message field supports all three Minecraft color systems:
- MiniMessage —
<red>, <#ff4455>
- Modern ampersand —
&c, &#ff4455
- Legacy ampersand —
&c, &x&f&f&4&4&5&5
Adding custom mods
Any mod that registers Minecraft translation keys can be detected. Find the key in the mod's language files (usually in assets/<modid>/lang/en_us.json) and add it to disallowed-mods:
disallowed-mods:
"Your Mod Name": "your.mod.translation.key"
Note: The default field must be set to a string that is never a valid translation output — the default "fallb" is safe for vanilla clients. Do not change it unless you understand the detection logic.
Requirements
| Requirement |
Version |
| Paper / Spigot |
1.19+ |
| PacketEvents |
Latest |
| Java |
17+ |
Installation
- Download and place
ModDetector.jar into your plugins/ folder
- Download PacketEvents and place it in
plugins/ as well
- Start the server —
config.yml will be generated automatically
- Edit
config.yml to configure your kick message and disallowed mods
- Reload with
/reload or restart the server
*Inspired by PvPClub's detection approach. *
评论 0
登录后参与评分
还没有评论,来抢沙发吧