? AltDetector
针对 Paper 的智能小号检测方案
从源头遏制封禁规避行为。AltDetector 在每个玩家登录时运行一个静默、完全异步的多层检测引擎——无延迟,不会因误报刷屏聊天栏,仅将精准警报直接发送给管理人员。
✨ 功能特性
? 多层检测引擎
每次登录都会通过四个独立的检测层进行分析,每层生成一个置信度分数,随后经过加权合并为最终的风险分数 (0.0–1.0):
| 层级 | 方法 | 权重 |
|---|---|---|
| **IP 匹配** | 共享 IP 地址历史 | 40% |
| **UUID / 用户名历史** | 换号及跨账号用户名冲突 | 25% |
| **登录模式分析** | 会话切换、非同时在线游玩、快速交替 | 25% |
| **行为指纹** | 游戏时长比例、高峰时段余弦相似度 | 10% |
所有检测均**完全异步运行**——主线程永远不会被阻塞。
⚠️ 智能风险阈值
| 分数 | 等级 | 操作 |
|---|---|---|
| 0.50 – 0.69 | ? 低 | 仅向管理员发送警报 |
| 0.70 – 0.84 | ? 中 | 向管理员发送警报 + 标记玩家记录 |
| 0.85 – 1.00 | ? 高 | 向管理员发送警报 + 标记 + 可选自动封禁 |
所有阈值均可完全自定义配置。
? 交互式管理员警报
警报仅静默发送给拥有 altdetector.staff.alerts 权限的玩家。每条警报都包含可点击的 [检查] [封禁] [忽略] [加入白名单] 按钮——无需输入任何命令。离线管理员在登录的瞬间即可收到排队等待的警报。
? 自动封禁系统
当检测到被封禁玩家的小号且其风险超过你配置的阈值时,AltDetector 可以自动执行封禁,并提供自定义的理由和申诉链接。触发可取消的 AltBanEvent 事件,以便其他插件进行挂钩。
?️ SQLite 存储(异步,WAL 模式)
所有数据均使用 WAL 日志模式和预编译语句存储在本地 SQLite 数据库中。跟踪的数据包括:
- IP 地址历史(每个玩家最多 20 条,先进先出)
- 用户名历史(最多 50 条,先进先出)
- 风险分数与标记状态
- 管理员备注
- 带有证据标签的完整检测日志
?️ 隐私与公平工具
- IP 匿名化 — 仅存储部分 IP 地址(前 3 个八位组)以符合 GDPR
合规要求
- 共享 IP 组 — 将家庭/LAN 玩家加入白名单,确保他们永远不会被
标记
- VPN/代理提示 — 检测数据中心 IP 范围(可配置的 CIDR 列表)并添加
vpn_hint 证据标签,略微增加风险值
- 绕过权限 — 授予受信任账户
altdetector.bypass 权限
?️ 命令
| 命令 | 描述 |
|---|---|
| `/alt <player> [page]` | 查看某玩家的所有已知小号及其风险分数 |
| `/altadmin inspect <player>` | 完整档案:IP、登录记录、风险、链接、证据 |
| `/altadmin history <player>` | 带时间戳的分页登录历史 |
| `/altadmin link <p1> <p2>` | 手动关联两个账号 |
| `/altadmin unlink <p1> <p2>` | 移除关联 |
| `/altadmin confirm <player>` | 确认检测到的关联关系 |
| `/altadmin whitelist <player>` | 将玩家加入检测白名单 |
| `/altadmin ban <player>` | 同时封禁该玩家及其所有已确认的小号 |
| `/altadmin note <player> <text>` | 附加管理员备注 |
| `/altadmin purge <player>` | 彻底清除 GDPR 相关数据 |
| `/altadmin export <player>` | 以 JSON 格式导出完整记录 |
| `/altadmin stats` | 检测统计数据 |
| `/altadmin reload` | 热重载配置与消息文件 |
所有子命令均支持 **Tab 键补全**。
? PlaceholderAPI 支持
| 占位符 | 值 |
|---|---|
| `%altdetector_risk_score%` | 玩家当前的风险分数 |
| `%altdetector_alt_count%` | 已知小号的数量 |
| `%altdetector_flagged%` | `true` 或 `false` |
? 自定义 API 事件
其他插件可以接入 AltDetector 的检测流程:
AltDetectedEvent — 在任何高于“低”阈值的检测发生时触发
AltBanEvent (可取消) — 在任何自动封禁之前触发
AltLinkConfirmedEvent — 当管理员确认关联关系时触发
AltWhitelistEvent — 在白名单变更时触发
? 依赖要求
- Paper 1.21+
- Java 21
- PlaceholderAPI (可选,软依赖)
⚙️ 配置
提供完整文档的 config.yml 和使用 MiniMessage 驱动的 messages.yml,其中包含命名占位符。随时使用 /altadmin reload 重新加载——无需重启服务器。
AltDetector 专为生存服、SMP、阵营服和竞技服设计,在这些服务器中,封禁规避是一个严重的问题。除 Paper 本身外无任何外部依赖。
? AltDetector
Intelligent Alternate Account Detection for Paper
Stop ban evasion in its tracks. AltDetector runs a silent, fully async multi-layer detection engine on every login — no lag, no false positives flooding chat, just precise alerts delivered straight to your staff.
✨ Features
? Multi-Layer Detection Engine
Every login is analyzed through four independent detection layers, each producing a confidence score that is then weighted and combined into a final risk score (0.
0–1.0):
| Layer | Method | Weight |
|---|---|---|
| **IP Match** | Shared IP address history | 40% |
| **UUID / Username History** | Name-swap & cross-account username collisions | 25% |
| **Login Pattern Analysis** | Session shifts, never-concurrent play, rapid alternation | 25% |
| **Behavior Fingerprint** | Playtime ratios, peak-hour cosine similarity | 10% |
All detection runs **fully asynchronously** — the main thread is never blocked.
⚠️ Smart Risk Thresholds
| Score | Level | Action |
|---|---|---|
| 0.50 – 0.69 | ? LOW | Staff alert only |
| 0.70 – 0.84 | ? MEDIUM | Staff alert + flag player record |
| 0.85 – 1.00 | ? HIGH | Staff alert + flag + optional auto-ban |
All thresholds are fully configurable.
? Interactive Staff Alerts
Alerts are silently sent only to players with altdetector.staff.alerts. Each alert includes clickable [Inspect] [Ban] [Dismiss] [Whitelist] buttons — no need to type a single command. Offline staff receive queued alerts the moment they log in.
? Auto-Ban System
When an alt of a banned player is detected above your configured threshold, AltDetector can automatically issue a ban with a customizable reason and appeal URL. Fires a cancellable AltBanEvent so other plugins can hook in.
?️ SQLite Storage (Async, WAL Mode)
All data is stored in a local SQLite database using WAL journal mode and prepared statements. Tracked data includes:
- IP address history (up to 20 per player, FIFO)
- Username history (up to 50, FIFO)
- Risk scores & flagged status
- Staff notes
- Full detection log with evidence tags
?️ Privacy & Fairness Tools
- IP Anonymization — store only partial IPs (first 3 octets) for GDPR
compliance
- Shared IP Groups — whitelist households/LAN players so they're never
flagged
- VPN/Proxy Hints — detects datacenter IP ranges (configurable CIDR list) and
adds
a
vpn_hint evidence tag with a small risk bump
- Bypass Permission — grant
altdetector.bypass to trusted accounts
?️ Commands
| Command | Description |
|---|---|
| `/alt <player> [page]` | View all known alts of a player with risk scores |
| `/altadmin inspect <player>` | Full profile: IPs, logins, risk, links, evidence |
| `/altadmin history <player>` | Paginated login history with timestamps |
| `/altadmin link <p1> <p2>` | Manually link two accounts |
| `/altadmin unlink <p1> <p2>` | Remove a link |
| `/altadmin confirm <player>` | Confirm a detected alt link |
| `/altadmin whitelist <player>` | Whitelist from detection |
| `/altadmin ban <player>` | Ban player and all confirmed alts simultaneously |
| `/altadmin note <player> <text>` | Attach a staff note |
| `/altadmin purge <player>` | Full GDPR data wipe |
| `/altadmin export <player>` | Export full record as JSON |
| `/altadmin stats` | Detection statistics |
| `/altadmin reload` | Hot-reload config & messages |
All subcommands support **tab-completion**.
? PlaceholderAPI Support
| Placeholder | Value |
|---|---|
| `%altdetector_risk_score%` | Player's current risk score |
| `%altdetector_alt_count%` | Number of known alt accounts |
| `%altdetector_flagged%` | `true` or `false` |
? Custom API Events
Other plugins can hook into AltDetector's pipeline:
AltDetectedEvent — fired on any detection above LOW threshold
AltBanEvent (cancellable) — fired before any auto-ban
AltLinkConfirmedEvent — fired when staff confirms a link
AltWhitelistEvent — fired on whitelist changes
? Requirements
- Paper 1.21+
- Java 21
- PlaceholderAPI (optional, soft-depend)
⚙️ Configuration
Fully documented config.yml and MiniMessage-powered messages.yml with named placeholders. Reload at any time with /altadmin reload — no restart needed.
AltDetector is designed for survival, SMP, factions, and competitive servers where ban evasion is a serious problem. Zero dependencies beyond Paper itself.
评论 0
登录后参与评分
还没有评论,来抢沙发吧