SomeFreeze
一款面向 Paper 1.16.5 的作弊检测(冻结)插件。管理员可以传唤可疑玩家进行限时审查,在私密检查频道中沟通,检测 AnyDesk ID,追踪挂机状态,并记录检查结果,支持可选的 MySQL 存储。
依赖项
- Paper 1.16.5(或兼容的 Spigot 分支)
- Java 8+
- ProtocolLib(可选,推荐)—— 通过客户端视角数据包改进 AFK 检测。构建前请将
ProtocolLib.jar 放入 libs/ 目录,或在服务器运行时安装它。
构建
mvn clean package
输出:target/SomeFreeze-1.0.1.jar
命令
主命令:/freeze
别名:/sfreeze、/проверка
| 命令 |
描述 |
权限 |
/freeze <player> |
对某玩家开始作弊检测 |
somefreeze.use |
/freeze |
以清白状态结束当前活动中的检测 |
somefreeze.use |
/freeze <player> (再次) |
如果你正在检测该玩家,则再次执行此命令将以清白状态结束检测 |
somefreeze.use |
/freeze checkafk [player] |
检查某玩家是否处于挂机状态(默认为你当前检测的目标玩家) |
somefreeze.checkafk |
/freeze history <player> |
显示某玩家的最近 15 条检测记录 |
somefreeze.history |
/freeze finish <reason> |
以配置好的原因结束检测(并执行关联的命令) |
somefreeze.finish |
/freeze time stop |
暂停封禁倒计时(例如在共享 AnyDesk 后) |
somefreeze.time |
/freeze time start |
恢复封禁倒计时 |
somefreeze.time |
权限
| 权限 |
描述 |
默认值 |
somefreeze.use |
开始/结束检测 |
op |
somefreeze.checkafk |
使用 /freeze checkafk |
op |
somefreeze.history |
查看检测历史 |
op |
somefreeze.finish |
带原因结束检测 |
op |
somefreeze.time |
暂停/恢复计时器 |
op |
somefreeze.notify |
接收检测通知 |
op |
somefreeze.bypass |
忽略冻结限制(移动、物品栏等) |
false |
somefreeze.admin |
授予上述所有权限 |
op |
检测流程
- 开始 — 管理员运行
/freeze <player>。嫌疑人被冻结在原地,传送至配置的检查位置(可选),并与该管理员绑定至本次会话。
- 限制 — 在被冻结期间,玩家无法移动、打开物品栏、进行交互、丢弃物品、受到伤害或执行大多数命令(与聊天相关的命令和
/freeze 除外)。拥有 somefreeze.bypass 权限的玩家不受影响。
- 计时器 — 倒计时运行(默认 7 分钟)。管理员会看到一个显示剩余时间的 BossBar。当时间归零时,会通过
on-time-expire 触发可配置的命令(例如封禁)。
- 提醒 — 按可配置的间隔,嫌疑人会收到聊天指令、一个可选的可点击 AnyDesk 链接以及标题/副标题覆盖层。
- AnyDesk — 如果嫌疑人在聊天中发布了一个 9-10 位的 ID(正则表达式可配置),管理员将收到通知并记录活动。
- 私聊 — 检查期间公共聊天被取消;管理员与嫌疑人之间的消息通过私聊路由,并提供可选的复制到剪贴板按钮。
- 计时器控制 —
/freeze time stop 暂停倒计时(屏幕共享后很有用);/freeze time start 恢复倒计时。
- 结束 —
/freeze 或 /freeze <same player> 标记玩家为清白,恢复其保存的位置,并保存历史记录。/freeze finish <reason> 应用配置的结果和命令。
- 断开连接 — 如果嫌疑人在活跃检查期间退出,会自动运行
reasons.left 命令(例如因离开而封禁)。
AFK 检测
插件全局跟踪玩家活动:
- 物品栏点击、拖拽和关闭
- 快捷栏槽位更改
- 视角旋转(位置不变的运动)
- ProtocolLib 查看数据包(启用时)
设置:
settings.afk-threshold-seconds — 在此无活动时间后,/freeze checkafk 报告 AFK(默认 30 秒)
settings.freeze-block-afk-seconds — 超过此无活动时间的玩家不能被呼叫进行检查(默认 180 秒 / 3 分钟)
在活跃检查期间,也会按会话跟踪无活动状态。
检查历史
每次完成的检查都会记录目标、管理员、状态、原因和时间戳。
- YAML(默认):
plugins/SomeFreeze/history.yml
- MySQL:在配置中启用;使用 HikariCP(已嵌入 JAR 中)
使用 /freeze history <player> 查看(最近 15 条记录)。
配置
设置 (settings)
| 键 |
描述 |
默认值 |
check-duration-seconds |
过期后自动执行操作前的等待时间 |
420(7分钟) |
reminder-interval-seconds |
聊天/标题提醒的间隔时间 |
5 |
teleport-on-freeze |
将嫌疑人传送至检查坐标 |
true |
world, x, y, z, yaw, pitch |
检查室的位置 |
world @ 0.5, 100, 0.5 |
restore-location |
完成后将玩家返回到检查前的位置 |
true |
execute-commands-as-moderator |
以管理员身份执行封禁/命令(备用:控制台) |
true |
anydesk-pattern |
用于检测聊天中 AnyDesk ID 的正则表达式 |
\d{9,10} |
afk-threshold-seconds |
checkafk 命令的闲置阈值 |
30 |
freeze-block-afk-seconds |
如果玩家处于此时长的 AFK 状态,则阻止 /freeze 命令 |
180 |
afk.track-inventory |
追踪背包活动 |
true |
afk.track-hotbar |
追踪快捷栏变化 |
true |
afk.track-look |
追踪视角旋转 |
true |
afk.look-sensitivity |
计为活动的最小视角变化量 |
2.0 |
afk.use-protocollib |
使用 ProtocolLib 获取视角数据包 |
true |
消息 (messages)
所有插件消息均支持占位符(见下文)。值得注意的部分包括:
freeze-chat — 在开始冻结及每次提醒时发送给嫌疑人的消息行
anydesk-link — 附加在第二条聊天消息后的可点击链接
freeze-title / freeze-subtitle — 标题覆盖层(支持渐变)
moderator-bossbar — 用于管理者的 BossBar 标题、颜色、样式和进度条
private-chat-format-sender / private-chat-format-receiver — 私聊格式(发送者/接收者)
private-chat-copy — 私聊消息旁边的复制按钮
结束原因 (reasons)
reasons 下的每个条目定义:
display — 显示在 /freeze finish 成功消息中
status — 保存到历史记录中
commands — 选择该原因时执行的命令(支持占位符)
默认键名:cheats、refuse、ignore、left、clean。
时间到期 (on-time-expire)
当计时器耗尽且未被暂停(如果尚未结束)时执行的命令。
消息颜色
配置字符串中支持以下格式:
- 传统颜色代码:
&a、&c 等
- 十六进制颜色:
&#FF5555 或 #FF5555
- 渐变色:
<gradient:#FF0000:#FFFF00>文本</gradient>
占位符
{player}、{target}、{moderator}、{time_left}、{time}、{reason}、{status}、{anydesk}、{date}、{prefix}、{message}
MySQL
mysql:
enabled: true
host: localhost
port: 3306
database: minecraft
username: root
password: password
table-prefix: sf_
当 enabled: false 时,历史记录将存储在 plugins/SomeFreeze/history.yml 中。
on-time-expire / 原因命令示例
on-time-expire:
commands:
- "ban {target} Failed check within 7 minutes"
reasons:
cheats:
display: "&cCheats"
status: "Banned (cheats)"
commands:
- "ban {target} Cheats during check"
clean:
display: "&aClean"
status: "Clean"
commands: []
命令可以加或不加 / 前缀;它们将以管理者身份(或在离线/设置禁用的情况下以控制台身份)执行。
SomeFreeze
A cheat-check (freeze) plugin for Paper 1.16.5. Moderators can summon suspected players for a timed review, communicate in a private check chat, detect AnyDesk IDs, track AFK activity, and record outcomes with optional MySQL storage.
Requirements
- Paper 1.16.5 (or compatible Spigot fork)
- Java 8+
- ProtocolLib (optional, recommended) — improves AFK detection via client look packets. Place
ProtocolLib.jar in libs/ before building, or install it on the server at runtime.
Build
mvn clean package
Output: target/SomeFreeze-1.0.1.jar
Commands
Main command: /freeze
Aliases: /sfreeze, /проверка
| Command |
Description |
Permission |
/freeze <player> |
Start a cheat check on a player |
somefreeze.use |
/freeze |
End the active check with status Clean |
somefreeze.use |
/freeze <player> (again) |
If you are already checking that player, ends the check as Clean |
somefreeze.use |
/freeze checkafk [player] |
Check whether a player is AFK (defaults to your current check target) |
somefreeze.checkafk |
/freeze history <player> |
Show the last 15 check records for a player |
somefreeze.history |
/freeze finish <reason> |
End the check with a configured reason (runs associated commands) |
somefreeze.finish |
/freeze time stop |
Pause the ban countdown (e.g. after AnyDesk is shared) |
somefreeze.time |
/freeze time start |
Resume the ban countdown |
somefreeze.time |
Permissions
| Permission |
Description |
Default |
somefreeze.use |
Start/end checks |
op |
somefreeze.checkafk |
Use /freeze checkafk |
op |
somefreeze.history |
View check history |
op |
somefreeze.finish |
Finish checks with a reason |
op |
somefreeze.time |
Pause/resume the timer |
op |
somefreeze.notify |
Receive check notifications |
op |
somefreeze.bypass |
Ignore freeze restrictions (movement, inventory, etc.) |
false |
somefreeze.admin |
Grants all permissions above |
op |
How a check works
- Start — A moderator runs
/freeze <player>. The suspect is frozen in place, teleported to the configured check location (optional), and linked to that moderator for the session.
- Restrictions — While frozen, the player cannot move, open inventories, interact, drop items, take damage, or run most commands (except chat-related commands and
/freeze). Players with somefreeze.bypass are unaffected.
- Timer — A countdown runs (default 7 minutes). The moderator sees a BossBar with time remaining. When it reaches zero, configurable commands run (e.g. ban) via
on-time-expire.
- Reminders — On a configurable interval, the suspect receives chat instructions, an optional clickable AnyDesk link, and a title/subtitle overlay.
- AnyDesk — If the suspect posts a 9–10 digit ID in chat (regex-configurable), the moderator is notified and activity is recorded.
- Private chat — Public chat is cancelled during a check; messages between moderator and suspect are routed privately, with an optional copy-to-clipboard button.
- Timer control —
/freeze time stop pauses the countdown (useful after screen sharing); /freeze time start resumes it.
- End —
/freeze or /freeze <same player> marks the player Clean, restores their saved location, and saves history. /freeze finish <reason> applies a configured outcome and commands.
- Disconnect — If the suspect quits during an active check,
reasons.left commands run automatically (e.g. ban for leaving).
AFK detection
The plugin tracks player activity globally:
- Inventory clicks, drags, and closes
- Hotbar slot changes
- Camera rotation (movement without position change)
- ProtocolLib look packets (when enabled)
Settings:
settings.afk-threshold-seconds — inactivity time after which /freeze checkafk reports AFK (default 30s)
settings.freeze-block-afk-seconds — players inactive longer than this cannot be called for a check (default 180s / 3 min)
During an active check, inactivity is tracked per session as well.
Check history
Every completed check is logged with target, moderator, status, reason, and timestamp.
- YAML (default):
plugins/SomeFreeze/history.yml
- MySQL: enable in config; uses HikariCP (shaded into the JAR)
View with /freeze history <player> (last 15 entries).
Configuration
Settings (settings)
| Key |
Description |
Default |
check-duration-seconds |
Time until auto-action on expiry |
420 (7 min) |
reminder-interval-seconds |
Interval for chat/title reminders |
5 |
teleport-on-freeze |
Teleport suspect to check coords |
true |
world, x, y, z, yaw, pitch |
Check room location |
world @ 0.5, 100, 0.5 |
restore-location |
Return player to pre-check position when done |
true |
execute-commands-as-moderator |
Run ban/commands as the moderator (fallback: console) |
true |
anydesk-pattern |
Regex to detect AnyDesk ID in chat |
\d{9,10} |
afk-threshold-seconds |
AFK threshold for checkafk |
30 |
freeze-block-afk-seconds |
Block /freeze if player is AFK this long |
180 |
afk.track-inventory |
Track inventory activity |
true |
afk.track-hotbar |
Track hotbar changes |
true |
afk.track-look |
Track camera rotation |
true |
afk.look-sensitivity |
Minimum look delta to count as activity |
2.0 |
afk.use-protocollib |
Use ProtocolLib for look packets |
true |
Messages (messages)
All plugin messages support placeholders (see below). Notable sections:
freeze-chat — lines sent to the suspect on start and each reminder
anydesk-link — clickable link appended after the second chat line
freeze-title / freeze-subtitle — title overlay (supports gradients)
moderator-bossbar — BossBar title, color, style, and progress for the moderator
private-chat-format-sender / private-chat-format-receiver — private check chat
private-chat-copy — copy button next to private messages
Finish reasons (reasons)
Each entry under reasons defines:
display — shown in /freeze finish success message
status — saved to history
commands — run when that reason is chosen (placeholders supported)
Default keys: cheats, refuse, ignore, left, clean.
Time expiry (on-time-expire)
Commands executed when the timer runs out without being paused (if not already finished).
Message colors
Supported in config strings:
- Legacy:
&a, &c, …
- Hex:
&#FF5555 or #FF5555
- Gradients:
<gradient:#FF0000:#FFFF00>text</gradient>
Placeholders
{player}, {target}, {moderator}, {time_left}, {time}, {reason}, {status}, {anydesk}, {date}, {prefix}, {message}
MySQL
mysql:
enabled: true
host: localhost
port: 3306
database: minecraft
username: root
password: password
table-prefix: sf_
When enabled: false, history is stored in plugins/SomeFreeze/history.yml.
Example on-time-expire / reason commands
on-time-expire:
commands:
- "ban {target} Failed check within 7 minutes"
reasons:
cheats:
display: "&cCheats"
status: "Banned (cheats)"
commands:
- "ban {target} Cheats during check"
clean:
display: "&aClean"
status: "Clean"
commands: []
Commands can be prefixed with / or not; they are dispatched as the moderator (or console if offline / setting disabled).
评论 0
登录后参与评分
还没有评论,来抢沙发吧