这是一个简单的服务端模组,通过利用 此 问题来检测客户端上的 Meteor Client。其工作原理与 DonutSMP 的检测机制非常相似。
免责声明:我感到有些羞愧,但毫不畏惧地承认:这段代码完全由 AI(Claude, Opus 4.6)生成。我并未编写此代码。你可以随意使用这段代码;它不属于我。
一旦 Meteor Client 修复了该问题,或者如果有更好的替代方案出现,我将把该项目设为未列出。
使用方法
默认情况下,本模组将禁止任何安装了 Meteor Client 的玩家加入服务器。检查会强制退出玩家可能正在交互的任何容器 GUI,因此请留意这一点。
配置选项
- action — 检测到 Meteor Client 时发生什么。KICK 将其断开连接,BAN 执行 /ban 命令,ALERT 通知管理员。
- checkOnJoin — 在玩家加入时运行检查。值可为 true 或 false。
- joinCheckDelayMin / joinCheckDelayMax — 加入后检查触发前的随机延迟范围(秒)。
- periodicCheck — 在线期间定期检查玩家。值可为 true 或 false。
- periodicCheckIntervalSeconds — 定期检查运行的频率(秒)。
- checkTimeoutSeconds — 放弃等待前的响应超时时间(秒)。
- kickMessage — 显示给被踢玩家的提示消息。%player% 替换为他们的名字。
- banMessage — /ban 命令中使用的理由。%player% 替换为他们的名字。
- staffAlertMessage — 检测到违规时发送给在线管理员的警报。%player% 替换为名字。
- staffOpLevel — 实际上没有任何作用。
- detectionKeys — 用于测试的翻译键。目前无法同时测试多个。
以下是一个推荐的配置。当玩家尝试加入时,这将立即禁止安装了 Meteor Client 的玩家。此外,由于检查是立即执行的,它不会干扰退出容器 GUI 的过程。由于玩家是在加入时进行检查的,因此无需再次定期检查玩家。
{
"action": "BAN",
"checkOnJoin": false,
"joinCheckDelayMin": 1,
"joinCheckDelayMax": 1,
"periodicCheck": false,
"periodicCheckIntervalSeconds":3600,
"checkTimeoutSeconds": 7200,
"kickMessage": "Disconnected: You have been kicked for the following reason: Cheating. Do not cheat again, or you will be permanently banned.",
"banMessage": "Disconnected: You have been banned for the following reason: Cheating.",
"staffAlertMessage": "%player% was flagged for using a modified client.",
"staffOpLevel": 2,
"detectionKeys": [
"key.meteor-client.open-gui"
]
This is a simple server-side mod that will detect meteor client on the client by utilizing this issue. It works very similarly to DonutSMP's detection.
DISCLAIMER: I am ashamed, but not afraid to admit that this code is 100% made by AI (Claude, Opus 4.6). I did not write this code. Feel free to do whatever you want with this code; it's not mine.
Once meteorclient patches this issue, or if a better alternative to this mod becomes available, I will make this project unlisted.
How to use
By default, this mod will ban any player who joins the server with meteorclient installed. A check will force-exit any container-gui that the player may be interacting with, so that is something to keep in mind.
Config Options
- action — What happens if meteorclient is detected. KICK disconnects them, BAN runs /ban, ALERT notifies ops.
- checkOnJoin — Run a check when players join. This can be true or false.
- joinCheckDelayMin / joinCheckDelayMax — Random delay range in seconds before the check fires after join.
- periodicCheck — Check players periodically while online. true or false.
- periodicCheckIntervalSeconds — How often periodic checks run in seconds.
- checkTimeoutSeconds — How long to wait for a response before giving up.
- kickMessage — Message shown to kicked players. %player% replaced with their name.
- banMessage — Reason used in /ban command. %player% replaced with their name.
- staffAlertMessage — Alert sent to online players on detection. %player% replaced.
- staffOpLevel — Does literally nothing.
- detectionKeys — Translation key to test. You cannot test more than 1 right now.
A recommended config is below. This will immediately ban a player with meteorclient when they attempt to join. It also won't mess with exiting container gui's because the check is immediate. Since players are checked upon joining, there is no need to periodically check players again.
{
"action": "BAN",
"checkOnJoin": false,
"joinCheckDelayMin": 1,
"joinCheckDelayMax": 1,
"periodicCheck": false,
"periodicCheckIntervalSeconds":3600,
"checkTimeoutSeconds": 7200,
"kickMessage": "Disconnected: You have been kicked for the following reason: Cheating. Do not cheat again, or you will be permanently banned.",
"banMessage": "Disconnected: You have been banned for the following reason: Cheating.",
"staffAlertMessage": "%player% was flagged for using a modified client.",
"staffOpLevel": 2,
"detectionKeys": [
"key.meteor-client.open-gui"
]
评论 0
登录后参与评分
还没有评论,来抢沙发吧