DiscordVerificator 是一款 Spigot 插件,允许你使用 Discord bot(机器人) 进行玩家身份验证。
[警告] 此插件旨在用于手动添加玩家的私人服务器,因为它需要你手动将每个玩家与其 Discord 个人资料关联。
它被开发为基于密码的授权(如 online-mode 设置为 false 的服务器上的 /login <password>,在 server.properties 中配置)的替代方案。
如果你遇到任何问题/错误,可以在 这里 提交反馈。
? 它是如何工作的?
该插件允许玩家将其用户名绑定到他们的 Discord 个人资料。
绑定过程由服务器的管理员控制。
为了绑定账号,管理员需要运行命令 /link <Player> <Discord ID>。(如何获取 Discord ID?)

然后,当玩家加入服务器时,会显示验证码。
为了加入服务器,玩家应该将你配置的 Discord bot(机器人) 收到的命令发送给机器人:



[注意] 验证仅在IP 地址更改时需要一次。
[注意] 如果玩家尚未绑定 Discord 个人资料,插件将阻止其加入服务器:
? 命令
/link <player> <discordId> — 将玩家绑定到其 Discord 个人资料。(如何获取 Discord ID?)
/unlink <player> — 将玩家从其 Discord 个人资料解绑。
/dvreload — 重新加载插件(包括 Discord bot)。
? 权限
discordVerificator.link (默认授予 operators(操作者)) — 允许使用 /link <player> <discordId>
discordVerificator.unlink (默认授予 operators(操作者)) — 允许使用 /unlink <player>
discordVerificator.reload (默认授予 operators(操作者)) — 允许使用 /dvreload
? 默认配置文件
[重要] 你应该将 DISCORD_BOT_TOKEN 替换为你的 Discord bot token(机器人令牌)。
否则,插件将无法工作!
# 1. 在 Discord Developer Portal 创建 Discord bot:https://discord.com/developers/applications
# 2. 从 "Bot" 选项卡获取 token
# 3. 在下文中插入 token
# 4. 运行 "/dvreload" 命令或重载服务器
# 5. 给予你的玩家向机器人发送命令的权限(例如,邀请它到你的 Discord 服务器)
token: "DISCORD_BOT_TOKEN"
messages:
"not-enough-permissions": "&c权限不足!"
"invalid-link-format": "&c格式无效!请使用:/link <player> <discordId>"
"invalid-unlink-format": "&c格式无效!请使用:/unlink <player>"
"invalid-user-id-format": "&c无效的 Discord ID 格式!"
"successfully-linked": "&a绑定成功!"
"successfully-unlinked": "&a解绑成功!"
"player-already-linked": "&c该玩家已经绑定!"
"player-was-not-linked": "&c该玩家从未被绑定过!"
"account-not-linked": "&c你的账号尚未绑定到任何 Discord 个人资料。"
"bot-not-working": "&cDiscord bot 当前无法正常工作!\n请要求管理员解决此问题。"
"confirm-with-command": "&6通过我们的 Discord bot 确认你的 IP\n用法:&f&n/confirm %s"
"wait-until-verification": "&c请等待直到你可以请求新的验证码!\n&f&n剩余 %s 秒。"
"error-occurred": "发生错误!"
"its-not-your-account": "你尝试确认的账号未绑定到你的 Discord 个人资料!"
"allowed": "已授权!"
"allowed-to-join-from-ip": "已成功允许从 `%s` 加入!"
"confirm-command": "在 Minecraft 服务器上验证你的命令"
"verification-code-you-got": "你从服务器收到的验证码"
"invalid-code": "验证码无效!"
"invalid-code-description": "此验证码无效!"
"invalid-usage": "用法无效!"
"provide-code-please": "请提供验证码!"
"user-not-found": "用户未找到!"
"user-not-found-description": "看起来你的账号尚未绑定到任何 Minecraft 用户名。"
"reloaded": "C60D[DiscordVerificator] 已重载!"
☂ 入门指南
[重要] 在开始之前,请确保插件版本与你的服务器版本兼容。
-
在 Discord 开发者门户 上创建一个 新的 Discord 应用程序


-
前往 “Bot” 选项卡,然后点击 “Reset token” 按钮


-
复制该令牌

-
从 Releases 标签页或 Spigot 页面下载该插件。
-
将下载的 .jar 文件放入服务器的 ./plugins 文件夹中。
-
重启服务器或输入 /reload 命令。
-
进入 ./plugins/DiscordVerificator 文件夹并打开 config.yml。
-
将 DISCORD_BOT_TOKEN 替换为你之前复制的令牌(token)。
-
保存配置文件并运行 /dvreload 命令
-
所有操作已完成! 现在你可以使用 link 命令将玩家与 Discord 账号关联,并将
邀请 此机器人 到你的 Discord 服务器(以便它们能够向 Discord 机器人 执行 confirm <code> 命令)。
DiscordVerificator is a Spigot plugin that allows you to do player authentication using Discord bot.<be>
[WARNING] This plugin is intended to be used on private servers with the manual player addition because it involves you to manually link each player to their Discord profile.
It was developed as an alternative for password-based authorization like /login <password> on servers with online-mode set to false (in server.properties).
If you have any issues/bugs, you may leave them here.
? How it works?
This plugin enables players to link their usernames to their Discord profiles.
The linking process is controlled by the administrator of the server.
In order to link the account, the admin should run /link <Player> <Discord ID>. (how to get discord id?)

Then, when a player joins the server, the verification code appears.
To join the server, the player should run the seen command to the Discord bot you've configured:



[NOTE] Verification is required once per IP change
[CAUTION] The plugin will prevent a player from joining if it wasn't linked to Discord profile yet: 
? Commands
/link <player> <discordId> — links the player to its Discord profile. (how to get discord id?)
/unlink <player> — unlinks the player from its Discord profile.
/dvreload — reloads the plugin (including Discord bot).
? Permissions
discordVerificator.link (for operators by default) — Allows to use /link <player> <discordId>
discordVerificator.unlink (for operators by default) — Allows to use /unlink <player>
discordVerificator.reload (for operators by default) — Allows to use /dvreload
? Default config
[IMPORTANT] You should replace DISCORD_BOT_TOKEN with your Discord bot token.
Otherwise, nothing will work!
# 1. Create a Discord bot on the Discord Developer Portal: https://discord.com/developers/applications
# 2. Get the token from the "Bot" tab
# 3. Insert the token below
# 4. Run the "/dvreload" command or reload the server
# 5. Give your players access to send a command to the bot (e.g., invite it to your Discord server)
token: "DISCORD_BOT_TOKEN"
messages:
"not-enough-permissions": "&cNot enough permissions!"
"invalid-link-format": "&cInvalid format! Please use: /link <player> <discordId>"
"invalid-unlink-format": "&cInvalid format! Please use: /unlink <player>"
"invalid-user-id-format": "&cInvalid Discord ID format!"
"successfully-linked": "&aSuccessfully linked!"
"successfully-unlinked": "&aSuccessfully unlinked!"
"player-already-linked": "&cThis player is already linked!"
"player-was-not-linked": "&cThis player was never linked!"
"account-not-linked": "&cYour account is not linked to a Discord profile yet."
"bot-not-working": "&cThe Discord bot is not currently working!\nAsk the administrator to resolve this issue."
"confirm-with-command": "&6Confirm your IP via our Discord bot\nUsage: &f&n/confirm %s"
"wait-until-verification": "&cPlease wait until you can request a new code!\n&f&n%s seconds left."
"error-occurred": "An error occurred!"
"its-not-your-account": "The account you're trying to confirm is not linked to your Discord profile!"
"allowed": "Allowed!"
"allowed-to-join-from-ip": "Successfully allowed to join from `%s`!"
"confirm-command": "Command to verify you on the Minecraft server"
"verification-code-you-got": "Verification code you've received from the server"
"invalid-code": "Invalid Code!"
"invalid-code-description": "This verification code is not valid!"
"invalid-usage": "Invalid usage!"
"provide-code-please": "Please provide the verification code!"
"user-not-found": "User not found!"
"user-not-found-description": "It seems like your account hasn't been linked to any Minecraft username yet."
"reloaded": "C60D[DiscordVerificator] Reloaded!"
☂ Getting started
[IMPORTANT] Before getting started, make sure that the plugin's version is compatible with your server version.
- Create a new discord application on Discord Developer Portal


- Go to the "Bot" tab and click on the "Reset token" button


- Copy the token

- Download the plugin from Releases tab or from Spigot page.
- Put the downloaded
.jar into the ./plugins folder of your server.
- Restart your server or enter the
/reload command.
- Go to
./plugins/DiscordVerificator folder and open config.yml
- Replace
DISCORD_BOT_TOKEN with the token you've copied previously
- Save the config and run the
/dvreload command
- Everything is done! Now you can link players with the
link command and
invite this bot to your Discord server (to make them able to run confirm <code> command to the Discord bot)
评论 0
登录后参与评分
还没有评论,来抢沙发吧