Sentinel
⚠️ 已在 Minecraft 1.20.1 上测试:
尽管 Sentinel 使用 Velocity 的登录 API,并不依赖于特定的 Minecraft 服务器软件或版本。它应该可以在你的 Velocity 代理支持的任何后端(包括 Paper、Spigot、Forge 和 Fabric 服务器)上正常工作。
Sentinel 是一个 Velocity 插件,用于安全地将 Minecraft 账号与 Discord 账号关联。它与一个 Discord 机器人集成,在允许玩家登录前进行验证,有助于防止冒充行为并协助玩家之间的连接。Sentinel 还提供隔离功能,以暂时限制问题玩家的访问权限。
命令
Discord 命令
/link <code>
将你的 Minecraft 账号链接到你的 Discord 账号。
/whois [discord: @user | minecraft: username]
查询已关联账号的信息。
/quarantine <user>
切换用户的隔离角色(Minecraft 用户名或 Discord @提及)。
需要员工角色权限。当用户被隔离时会自动踢出在线玩家。
特性
- 账号关联:将 Minecraft 账号链接到 Discord 的安全验证系统
- 登录保护:阻止未关联账号的玩家加入(可配置绕过服务器)
- 角色管理:为已关联玩家自动分配 Discord 角色
- 隔离系统:员工可以隔离问题玩家,阻止其登录并踢出在线玩家
- 自动清理:移除离开 Discord 的用户数据库条目
- 速率限制:通过智能速率限制尊重 Discord API 的限制
要求
- Java 17+
- Velocity 代理(已在 3.4.0-SNAPSHOT 上测试)
- MySQL 或 MariaDB
设置
-
安装插件
将阴影 JAR 文件放入 Velocity 代理的 plugins/ 文件夹中。
-
配置 MySQL 和 Discord
首次运行时,将创建 plugins/sentinel/config.json。填写你的数据库凭据、Discord 令牌,并可选择配置隔离和员工角色:
{
"mysql": {
"host": "localhost",
"port": 3306,
"database": "sentinel",
"username": "sentinel_user",
"password": "password"
},
"discord": {
"token": "your_discord_bot_token",
"linkedRole": "123456789012345678",
"quarantineRole": "987654321098765432",
"quarantineMessage": "Your account has been quarantined. Contact an administrator.",
"staffRoles": ["111111111111111111", "222222222222222222"]
},
"bypassServers": {
"servers": ["lobby", "auth"]
}
}
配置选项
-
bypassServers:绕过 Discord 验证要求的服务器名称。对于应允许未验证玩家加入的大厅或认证服务器非常有用。
-
linkedRole:(可选)自动分配给所有已关联玩家的 Discord 角色 ID。当配置时:
- 所有现有的已关联账号在机器人启动时获得该角色(受速率限制)
- 新关联的账号立即获得该角色
- 角色同步在大数据库中大约需要 20 分钟完成
-
quarantineRole:(可选)被隔离玩家的 Discord 角色 ID。当配置时:
- 拥有此角色的玩家将无法登录
- 员工可以使用
/quarantine 命令切换此角色
- 在线玩家在隔离时会被立即踢出
-
quarantineMessage:被隔离玩家尝试加入或被踢出时显示的消息
-
staffRoles:可使用 /quarantine 命令的 Discord 角色 ID 数组
Sentinel
⚠️ Tested with Minecraft 1.20.1:
This said, Sentinel uses Velocity’s login API and does not depend on specific Minecraft server software or versions. It should work with any backend supported by your Velocity proxy including Paper, Spigot, Forge, and Fabric servers.
Sentinel is a Velocity plugin that securely links Minecraft accounts to Discord accounts. It integrates with a Discord bot to verify players before allowing login, helping to prevent impersonation and aiding in connecting players together. Sentinel also provides quarantine functionality to temporarily restrict access for problematic players.
Commands
Discord Commands
/link <code>
Link your Minecraft account to your Discord account.
/whois [discord: @user | minecraft: username]
Look up linked account info.
/quarantine <user>
Toggle quarantine role for a user (Minecraft username or Discord @mention).
Requires staff role permissions. Automatically kicks online players when quarantined.
Features
- Account Linking: Secure verification system linking Minecraft accounts to Discord
- Login Protection: Prevents unlinked accounts from joining (with configurable bypass servers)
- Role Management: Automatic Discord role assignment for linked players
- Quarantine System: Staff can quarantine problematic players, preventing login and kicking online players
- Automatic Cleanup: Removes database entries for users who leave Discord
- Rate Limiting: Respects Discord API limits with intelligent rate limiting
Requirements
- Java 17+
- Velocity Proxy (tested on 3.4.0-SNAPSHOT)
- MySQL or MariaDB
Setup
-
Install the plugin
Place the shaded JAR into your plugins/ folder on your Velocity proxy.
-
Configure MySQL and Discord
On first run, plugins/sentinel/config.json will be created. Fill in your database credentials, Discord token, and optionally configure quarantine and staff roles:
{
"mysql": {
"host": "localhost",
"port": 3306,
"database": "sentinel",
"username": "sentinel_user",
"password": "password"
},
"discord": {
"token": "your_discord_bot_token",
"linkedRole": "123456789012345678",
"quarantineRole": "987654321098765432",
"quarantineMessage": "Your account has been quarantined. Contact an administrator.",
"staffRoles": ["111111111111111111", "222222222222222222"]
},
"bypassServers": {
"servers": ["lobby", "auth"]
}
}
Configuration Options
-
bypassServers: Server names that bypass Discord verification requirement. Useful for lobbies or auth servers where unverified players should be allowed.
-
linkedRole: (Optional) Discord role ID automatically assigned to all linked players. When configured:
- All existing linked accounts receive the role on bot startup (rate-limited)
- New accounts that link immediately receive the role
- Role synchronization spreads over ~20 minutes for large databases
-
quarantineRole: (Optional) Discord role ID for quarantined players. When configured:
- Players with this role are denied login
- Staff can use
/quarantine command to toggle this role
- Online players are immediately kicked when quarantined
-
quarantineMessage: Message shown to quarantined players when they try to join or are kicked
-
staffRoles: Array of Discord role IDs that can use the /quarantine command
评论 0
登录后参与评分
还没有评论,来抢沙发吧