?️ AuthCord
AuthCord Whitelist 是一款用于保护 Minecraft 服务器的插件。该插件将服务器白名单与由 Discord 机器人提供支持的认证系统相结合。
? 主要功能:
-
两种运行模式:完全支持 online-mode=true/false 的服务器。
-
单点登录(无密码登录):将玩家的游戏内账户与其 Discord 个人资料及 IP 地址关联。如果玩家从受信任的 IP 连接,系统将自动完成认证。
-
Discord 通知:如果有人尝试使用你的用户名从不同的 IP 地址登录,机器人将通过私信立即向你发送通知。
-
全面兼容 Folia:插件专为 Folia 的多线程架构设计,在标准的 Paper 服务器上也能完美运行。
-
具备请求冷却系统和验证码有效期限制(防止暴力破解攻击和垃圾信息)。
? 运行模式
online-mode=true
-
当尚未在白名单中的玩家尝试加入时,服务器会将他们踢出,并在其屏幕上显示一个唯一的验证代码。
-
玩家将此代码发送给 Discord 上的机器人私聊。
-
机器人通过 Mojang API 验证玩家的许可证,并将其添加到服务器白名单中。
online-mode=false
-
传统基于密码插件的安全替代方案。
-
玩家可以加入服务器,但处于“冻结”状态:无法移动、聊天或破坏方块。
-
玩家在遊戲內輸入 /getcode 以獲取驗證碼,然後將該代碼發送給機器人。
-
机器人将玩家的 Discord ID 和 IP 地址与其游戏内的昵称关联。
-
防护机制:如果 IP 地址发生变化(或有其他人尝试登录),插件将再次冻结该玩家,并通过 Discord 向账户所有者发送通知,其中包含确认新 IP 地址的按钮。
?️ 命令
游戏内:
- /getcode — 获取用于 Discord 验证的临时代码。
Discord 中:
- /verify [code] — 确认账户所有权并加入白名单。
? 安装说明
- 在服务器上安装插件。
- 在 Discord 开发者门户 创建一个机器人。
- 在机器人的设置中启用“服务器成员意图”(Server Members Intent)。
- 将机器人的 token 和服务器的 Guild ID 输入到
config.yml 文件中。
- 选择一种运行模式(ONLINE 或 OFFLINE)并根据喜好自定义消息。
- 重启服务器。
⚙️ config.yml
discord:
token: "token"
guild-id: "guild id"
settings:
# ru/en console output
language: "en"
auth-mode: "OFFLINE" #ONLINE/OFFLINE
code-expiration-minutes: 5
request-cooldown-seconds: 30
discord-invite-url: "https://discord.gg/your-invite"
messages:
in-game:
messages:
in-game:
kick-online: "<red>你不在白名单中!</red>\n<white>你的代码:<yellow>%code%</yellow></white>\n<gray>在我们的 Discord 服务器中验证 > <blue><underlined>%url%</underlined></blue></gray>"
not-registered: "<red>你未注册!</red>\n<white>输入 <yellow>/getcode</yellow> 并在 </white><click:open_url:'%url%'><hover:show_text:'<aqua>打开 Discord 链接</aqua>'><blue>[Discord]</blue></hover></click> 中确认。</white>"
action-blocked: "<red>要游玩你需要确认 Discord:</red><click:open_url:'%url%'><hover:show_text:'<aqua>加入我们的 Discord</aqua>'><blue><underlined>[点击此处]</underlined></blue></hover></click>"
new-ip: "<red>检测到新的 IP 地址!</red>\n<white>出于安全原因,请输入 <yellow>/getcode</yellow> 并通过 Discord 确认你的登录。</white>"
auth-success: "<green>IP 认证成功!</green>"
getcode-success: "<white>你的代码:<yellow>%code%</yellow></white>\n<gray>在 Discord 中发送 <aqua>/verify %code%</aqua>。</gray>"
verify-success: "<green>认证成功!</green> <white>你的 IP 地址已保存。</white>"
cooldown: "<red>请在请求另一个代码前等待 <yellow>%time%</yellow> 秒!</red>"
code-expired: "<red>代码已过期!请在游戏中重新获取。</red>"
discord:
discord-already-used: "此 Discord 账号已关联!"
invalid-code: "无效或已过期的代码!"
already-linked: "此用户名已关联到其他 Discord 用户!"
verify-success: "账户 **%player%** 验证成功!"
player-offline: "验证期间玩家必须在服务器上在线!"
dm-alert: |
**注意!登录尝试!**
有人正尝试登录你的 Minecraft 账户 **%player%**。**IP 地址:** `%ip%`
**如果是你自己:** 在游戏中输入 `/getcode` 并使用 Discord 服务器中的 `/verify` 命令确认新 IP。
**如果不是你:** 只需忽略此消息。入侵者已在服务器上被冻结,无法进行任何操作!
⚙️ data.yml
users:
nickname:
discord: 'discord_id'
ip: 玩家上次使用的 IP // 如果 auth-mode: "ONLINE" 则为 'mojang_verified'
?️ AuthCord
AuthCord Whitelist is a plugin for securing your Minecraft server. This plugin combines server whitelisting with an authentication system powered by a Discord bot.
? Key Features:
-
Two Operation Modes: Full support for online-mode=true/false servers.
-
SSO (Passwordless Login): Links a player's in-game account to their Discord profile and IP address. If a player connects from a trusted IP, they are authenticated automatically.
-
Discord Notifications: If someone attempts to log in using your username from a different IP address, the bot will instantly send you a notification via direct message.
-
Full Folia Compatibility: The plugin is designed with Folia's multi-threaded architecture in mind and works perfectly on standard Paper servers.
-
Features a cooldown system for code requests and limited code validity periods (protecting against brute-force attacks and spam).
? Operation Modes
online-mode=true
-
When a player not currently on the whitelist attempts to join, the server kicks them while displaying a unique verification code on their screen.
-
The player enters this code into a direct message to the bot on Discord.
-
The bot verifies the player's license via the Mojang API and adds them to the server whitelist.
online-mode=false
-
A secure alternative to traditional password-based plugins.
-
The player joins the server but remains "frozen": they cannot move, chat, or break blocks.
-
The player types /getcode in-game to receive a verification code, then sends that code to the bot.
-
The bot links a player's Discord ID and IP address to their in-game nickname.
-
Protection: If the IP address changes (or if a different person attempts to log in), the plugin will freeze the player again and send a notification to the account owner via Discord, including a button to confirm the new IP address.
?️ Commands
In-game:
- /getcode — Obtain a temporary code for Discord verification.
In Discord:
- /verify [code] — Confirm account ownership and join the whitelist.
? Installation Instructions
- Install the plugin on your server.
- Create a bot in the Discord Developers Portal.
- Enable the "Server Members Intent" in the bot's settings.
- Enter the bot's token and your server's Guild ID into the
config.yml file.
- Select an operating mode (ONLINE or OFFLINE) and customize the messages to your liking.
- Restart the server.
⚙️ config.yml
discord:
token: "token"
guild-id: "guild id"
settings:
# ru/en console output
language: "en"
auth-mode: "OFFLINE" #ONLINE/OFFLINE
code-expiration-minutes: 5
request-cooldown-seconds: 30
discord-invite-url: "https://discord.gg/your-invite"
messages:
in-game:
messages:
in-game:
kick-online: "<red>You are not on the whitelist!</red>\n<white>Your code: <yellow>%code%</yellow></white>\n<gray>Verify it in our Discord server > <blue><underlined>%url%</underlined></blue></gray>"
not-registered: "<red>You are not registered!</red>\n<white>Enter <yellow>/getcode</yellow> and confirm it in </white><click:open_url:'%url%'><hover:show_text:'<aqua>Open Discord Link</aqua>'><blue>[Discord]</blue></hover></click>"
action-blocked: "<red>To play you need to confirm Discord: </red><click:open_url:'%url%'><hover:show_text:'<aqua>Join our Discord</aqua>'><blue><underlined>[Click here]</underlined></blue></hover></click>"
new-ip: "<red>A new IP address has been detected!</red>\n<white>For security reasons, enter <yellow>/getcode</yellow> and confirm your login via Discord.</white>"
auth-success: "<green>IP authentication successful!</green>"
getcode-success: "<white>Your code: <yellow>%code%</yellow></white>\n<gray>Send <aqua>/verify %code%</aqua> in Discord.</gray>"
verify-success: "<green>Authentication successful!</green> <white>Your IP address has been saved.</white>"
cooldown: "<red>Please wait <yellow>%time%</yellow> seconds before requesting another code!</red>"
code-expired: "<red>The code has expired! Request a new one in-game.</red>"
discord:
discord-already-used: "This Discord account is already linked!"
invalid-code: "Invalid or expired code!"
already-linked: "This username is already linked to another Discord user!"
verify-success: "Account **%player%** successfully verified!"
player-offline: "The player must be online on the server during verification!"
dm-alert: |
**ATTENTION! LOGIN ATTEMPT!**
Someone is attempting to log in to your Minecraft account **%player%**. **IP Address:** `%ip%`
**If this is you:** Type `/getcode` in-game and confirm the new IP using the `/verify` command on the Discord server.
**If this is NOT you:** Simply ignore this message. The intruder has been frozen on the server and cannot do anything!
⚙️ data.yml
users:
nickname:
discord: 'discord_id'
ip: player's last IP // 'mojang_verified' if auth-mode: "ONLINE"
评论 0
登录后参与评分
还没有评论,来抢沙发吧