Velocity Discord Verification — Velocity 代理的 Discord 验证系统
此项目功能
Velocity Discord Verification 是一个插件,要求玩家在访问 Minecraft 服务器之前链接其 Discord 账号。当玩家首次连接时,他们会被放置在一个自定义的 Limbo 世界中,并收到一个 4 位验证码。玩家将此代码通过私信发送给 Discord 机器人,随后双方账号绑定,玩家即可接入服务器。
下载理由
该插件通过要求通过 Discord 进行身份验证来提供服务器安全性。它完全集成在单个 JAR 文件中,无需单独托管机器人,自动同步 Discord 角色和昵称,即使在大型服务器上也能保持高性能运行。系统包含防暴力破解保护、带有渐变消息和音效的美观界面。
下载前的重要信息
需要 Velocity 3.0+、Java 17+ 以及 LimboAPI 插件。你需要一个启用了所需 Intents 的 Discord 机器人令牌。插件支持 SQLite(默认)和 MySQL,适用于多代理设置。所有消息均可通过配置文件完全自定义。
主要特性
- 服务器访问前的 Discord 验证
- 内置 Discord 机器人(无需单独托管)
- 自动同步 Discord 角色和昵称
- 美观的界面,带有渐变消息、操作栏和音效
- 攻击防护:尝试次数限制、代码过期、防暴力破解保护
- 使用 HikariCP 实现高性能
安装步骤
- 下载 velocity-discord-verification.jar
- 将文件放入 plugins/ 文件夹
- 安装 LimboAPI 插件
- 启动服务器以生成配置文件
- 编辑 config.yml 和 messages.yml
- 重启服务器
Discord 机器人设置
- 在 Discord Developer Portal 创建应用
- 创建机器人并复制令牌
- 启用 Intents:MESSAGE CONTENT INTENT、SERVER MEMBERS INTENT、DIRECT MESSAGES
- 通过 OAuth2 将机器人邀请到你的服务器
工作原理
当玩家首次连接时,系统会在数据库中检查其 UUID。如果未找到,则生成一个 4 位代码,并将玩家传送至 Limbo 世界。在那里,他们会看到说明和操作栏上的倒计时(30 秒)。玩家通过私信将代码发送给 Discord 机器人。机器人验证代码,绑定账号,玩家会收到成功消息。重新连接时,玩家将直接进入服务器。
对于回归玩家,系统会检查他们是否在 Discord 服务器上。如果是,他们将自动获得验证角色并可以连接。
Limbo 世界
验证过程发生在一个特殊的世界中,该世界具有虚空、不可见的屏障笼子(5x5x4)、禁用的聊天和方块交互功能。玩家会在操作栏上看到倒计时、每 5 秒一次的定期提醒以及音效。
安全性
系统包括尝试次数限制(每分钟 3 次)、密码学安全的代码生成、一次性代码且有过期时间(30 秒)、自动清理过期代码,并确保一个 Discord 账号仅绑定一个 Minecraft UUID。
配置
插件使用 config.yml 设置主要参数:机器人令牌、Discord 服务器 ID、验证角色 ID、代码长度、过期时间、尝试限制、数据库类型(SQLite 或 MySQL)。所有消息均在 messages.yml 中完全可自定义,支持 MiniMessage 格式。
性能
插件针对大型服务器进行了优化,使用 HikariCP 进行连接池管理、异步调用 Discord API、高效的代码清理调度器以及极低的内存消耗。对于少于 100 名玩家的服务器,推荐使用 SQLite;对于大型服务器和多代理设置,推荐使用 MySQL。
故障排除
如果机器人未启动,请验证令牌是否正确,并在 Discord Developer Portal 中确认已启用 Intents。如果玩家无法验证,请确保机器人拥有私信权限且服务器 ID 正确。如果出现数据库错误,请检查你的凭据并确保 MySQL 正在运行(如果使用 MySQL)。
许可证
MIT
致谢
LimboAPI, JDA (Discord Java API), Velocity
Velocity Discord Verification — Discord verification system for Velocity proxy
What this project does
Velocity Discord Verification is a plugin that requires players to link their Discord account before accessing your Minecraft server. When a player connects for the first time, they are placed in a custom Limbo world where they receive a 4-digit verification code. The player sends this code to the Discord bot via direct message, after which their accounts are linked and they gain access to the server.
Why you should download
The plugin provides server security by requiring identity verification through Discord. It is fully integrated into a single JAR file, requires no separate bot hosting, automatically synchronizes Discord roles and nicknames, and operates with high performance even on large servers. The system includes brute-force protection, a beautiful interface with gradient messages and sound effects.
Important information before downloading
Requires Velocity 3.0+, Java 17+, and the LimboAPI plugin. You need a Discord bot token with required intents enabled. The plugin supports SQLite (by default) and MySQL for multi-proxy setups. All messages are fully customizable through config files.
Key features
- Discord verification before server access
- Built-in Discord bot (no separate hosting required)
- Automatic Discord role and nickname synchronization
- Beautiful interface with gradient messages, action bar, and sound effects
- Attack protection: attempt limiting, code expiration, brute-force protection
- High performance using HikariCP
How to install
- Download velocity-discord-verification.jar
- Place the file in the plugins/ folder
- Install the LimboAPI plugin
- Start the server to generate config files
- Edit config.yml and messages.yml
- Restart the server
Discord bot setup
- Create an application on Discord Developer Portal
- Create a bot and copy the token
- Enable intents: MESSAGE CONTENT INTENT, SERVER MEMBERS INTENT, DIRECT MESSAGES
- Invite the bot to your server via OAuth2
How it works
When a player connects for the first time, the system checks their UUID in the database. If not found, a 4-digit code is generated and the player is teleported to the Limbo world. There they see instructions and a action bar with a countdown (30 seconds). The player sends the code to the Discord bot via direct message. The bot verifies the code, links the accounts, and the player receives a success message. Upon reconnection, the player goes directly to the server.
For returning players, the system checks if they are on the Discord server. If yes, they are automatically assigned the verification role and can connect.
Limbo world
Verification takes place in a special world with a void, an invisible barrier cage (5x5x4), disabled chat and block interaction. The player sees a action bar with countdown, periodic reminders every 5 seconds, and sound effects.
Security
The system includes attempt limiting (3 per minute), cryptographically secure code generation, one-time codes with expiration (30 seconds), automatic cleanup of expired codes, and ensures that one Discord account is linked to only one Minecraft UUID.
Configuration
The plugin uses config.yml for main parameters: bot token, Discord server ID, verification role ID, code length, expiration time, attempt limit, database type (SQLite or MySQL). All messages are fully customizable in messages.yml with MiniMessage formatting support.
Performance
The plugin is optimized for large servers using HikariCP for connection pooling, asynchronous Discord API calls, efficient code cleanup scheduler, and minimal memory consumption. For servers with less than 100 players, SQLite is recommended; for large servers and multi-proxy setups — MySQL.
Troubleshooting
If the bot doesn't start, verify the token is correct and intents are enabled in Discord Developer Portal. If players can't verify, ensure the bot has direct message permissions and the server ID is correct. For database errors, check your credentials and ensure MySQL is running (if using MySQL).
License
MIT
Credits
LimboAPI, JDA (Discord Java API), Velocity
评论 0
登录后参与评分
还没有评论,来抢沙发吧