vLink
vLink 是一款轻量级的 Paper 和 Velocity 插件,允许玩家安全地将 Minecraft 账户与 Discord 关联。关联后,Discord 角色可以自动同步到 LuckPerms 组中。
玩家在游戏中的 /link 命令生成临时代码,并在 Discord 中使用 /link <code> 进行确认。随后,他们的 Minecraft 和 Discord 账户将被连接,从而实现角色和昵称的自动同步。
兼容性
一个通用的 JAR 文件即可在两个受支持的平台上运行:
- Paper 1.21 至 1.21.11
- Paper 26.1、26.1.1、26.1.2 和 26.2
- Velocity 3.4.0 及兼容的新版 3.x 版本
- Java 21(适用于 Minecraft 1.21 至 1.21.11)
- Java 25(适用于 Minecraft 26.1 及更高版本)
功能
- 适用于 Paper 和 Velocity 的通用 JAR 包
- 使用临时且过期的代码进行安全的账户关联
- 支持通过 Discord 斜杠命令确认代码
- 基于 LuckPerms 组同步 Discord 角色
- 可选的已关联玩家专属 Discord 角色
- 可选的 Discord 昵称同步
- 玩家加入时自动同步角色
- 可配置的周期性角色同步
- 可选的成员离开 Discord 服务器时自动解除关联
- 可配置链接代码长度、过期时间和命令冷却时间
- 可选的 Discord 日志频道,用于记录关联、解除关联和同步事件
- 应用更改前预览角色变更
- 支持按玩家名称、UUID、Discord ID 或提及查找账户
- 可编辑 MiniMessage 格式的消息
- 支持 bStats 统计(适用于 Paper 和 Velocity)
命令
游戏中
/link - 生成新的 Discord 链接代码
/link status - 显示您当前的链接状态
/link sync - 同步您的 Discord 角色
/link unlink - 解除您的账户关联
/link discord - 显示配置的 Discord 邀请链接
/unlink - 解除您的账户关联
/discord - 显示配置的 Discord 邀请链接
/vlink reload - 重新加载配置、链接信息和 Discord 机器人
/vlink sync <player|all> - 同步一个或所有已关联的账户
/vlink unlink <player> - 解除其他玩家的链接
/vlink status <player> - 显示其他玩家的链接状态
/vlink lookup <player|uuid|discord-id|mention> - 查找已关联的账户
/vlink preview <player> - 预览 Discord 角色变更
/vlink debug - 检查当前设置
/discordlink 是 /vlink 的别名。
Discord
/link <code> - 确认 Minecraft 链接代码
/sync - 同步您的角色
/status - 显示您当前的链接状态
/unlink - 解除您的账户关联
安装
- 下载
VLink-1.0.4.jar。
- 将该 JAR 放入 Paper 或 Velocity 的
plugins 文件夹中。
- 在与 vLink 相同的平台上安装 LuckPerms。
- 完全重启服务器或代理。
- 打开生成的
config.yml。
- 配置 Discord 机器人令牌、服务器 ID、邀请 URL 和角色映射。
- 编辑配置后,运行
/vlink reload 或重启服务器。
Discord 机器人需要 Manage Roles(管理角色)权限。其最高 Discord 角色必须位于 vLink 应添加或删除的所有角色之上。
配置
discord:
# 切勿发布或分享您的机器人令牌。
bot-token: "PUT_TOKEN_HERE"
# 机器人安装的 Discord 服务器 ID。
guild-id: "PUT_GUILD_ID_HERE"
# 通过 /discord 和 /link discord 显示的邀请链接。
invite-url: "https://discord.gg/your-server"
discord-logs:
# 将 vLink 事件发送到 Discord 文本频道。
enabled: false
# 用于记录的 Discord 频道 ID。
channel-id: "PUT_LOG_CHANNEL_ID_HERE"
log-link: true
log-unlink: true
log-sync: true
log-sync-failures: true
log-discord-leave: true
# 目前包含的语言:en
language: "en"
linking:
# 生成的账户链接代码的长度。
code-length: 6
# 未使用的链接代码过期前的分钟数。
code-expire-minutes: 10
# 玩家可以再次生成代码之前的秒数。
command-cooldown-seconds: 30
# 每当玩家加入时同步 Discord 角色。
sync-on-join: true
# 同步间隔(分钟)。
# 将其设置为 0 以禁用周期性同步。
periodic-sync-minutes: 10
# 如果成员离开 Discord 服务器,则解除账户关联。
unlink-on-discord-leave: true
roles:
# 当不再分配匹配的 LuckPerms 组时,移除配置的 Discord 角色。
remove-unmapped-managed-roles: true
# 当账户解除关联时,移除由 vLink 管理的所有角色。
remove-managed-roles-on-unlink: true
# 分配给每个已关联 Discord 成员的可选角色。
# 留空以禁用它。
linked-role-id: "PUT_LINKED_ROLE_ID_HERE"
# LuckPerms 组名称:Discord 角色 ID
group-role-map:
vip: "PUT_VIP_ROLE_ID_HERE"
admin: "PUT_ADMIN_ROLE_ID_HERE"
nickname-sync:
# 将 Discord 昵称与 Minecraft 名称同步。
enabled: false
# 可用占位符:{player}
format: "{player}"
vLink
vLink is a lightweight Paper and Velocity plugin that allows players to securely link their Minecraft account with Discord. Once linked, Discord roles can automatically be synchronized with LuckPerms groups.
Players generate a temporary code in game with /link and confirm it on Discord using /link <code>. Their Minecraft and Discord accounts are then connected, allowing roles and nicknames to be synchronized automatically.
Compatibility
One universal JAR works on both supported platforms:
- Paper 1.21 through 1.21.11
- Paper 26.1, 26.1.1, 26.1.2, and 26.2
- Velocity 3.4.0 and compatible newer 3.x releases
- Java 21 for Minecraft 1.21 through 1.21.11
- Java 25 for Minecraft 26.1 and newer
Features
- One universal JAR for Paper and Velocity
- Secure account linking with temporary, expiring codes
- Discord slash command for code confirmation
- Discord role synchronization based on LuckPerms groups
- Optional linked-player Discord role
- Optional Discord nickname synchronization
- Automatic role synchronization when a player joins
- Configurable periodic role synchronization
- Optional automatic unlink when a member leaves the Discord server
- Configurable link-code length, expiration, and command cooldown
- Optional Discord log channel for link, unlink, and sync events
- Role-change preview before applying changes
- Account lookup by player, UUID, Discord ID, or mention
- Editable MiniMessage-formatted messages
- bStats support for Paper and Velocity
Commands
In game
/link - Generate a new Discord link code
/link status - Show your current link status
/link sync - Synchronize your Discord roles
/link unlink - Remove your account link
/link discord - Show the configured Discord invitation
/unlink - Remove your account link
/discord - Show the configured Discord invitation
/vlink reload - Reload the configuration, links, and Discord bot
/vlink sync <player|all> - Synchronize one or all linked accounts
/vlink unlink <player> - Remove another player's link
/vlink status <player> - Show another player's link status
/vlink lookup <player|uuid|discord-id|mention> - Find a linked account
/vlink preview <player> - Preview Discord role changes
/vlink debug - Check the current setup
/discordlink is available as an alias for /vlink.
Discord
/link <code> - Confirm a Minecraft link code
/sync - Synchronize your roles
/status - Show your current link status
/unlink - Remove your account link
Installation
- Download
VLink-1.0.4.jar.
- Put the same JAR into the
plugins folder of Paper or Velocity.
- Install LuckPerms on the same platform as vLink.
- Fully restart the server or proxy.
- Open the generated
config.yml.
- Configure the Discord bot token, guild ID, invitation URL, and role mappings.
- Run
/vlink reload or restart the server after editing the configuration.
The Discord bot requires the Manage Roles permission. Its highest Discord role must be placed above every role that vLink should add or remove.
Configuration
discord:
# Never publish or share your bot token.
bot-token: "PUT_TOKEN_HERE"
# ID of the Discord server on which the bot is installed.
guild-id: "PUT_GUILD_ID_HERE"
# Invitation displayed with /discord and /link discord.
invite-url: "https://discord.gg/your-server"
discord-logs:
# Send vLink events to a Discord text channel.
enabled: false
# Discord channel ID used for logging.
channel-id: "PUT_LOG_CHANNEL_ID_HERE"
log-link: true
log-unlink: true
log-sync: true
log-sync-failures: true
log-discord-leave: true
# Currently included language: en
language: "en"
linking:
# Length of generated account-link codes.
code-length: 6
# Minutes before an unused link code expires.
code-expire-minutes: 10
# Seconds before a player can generate another code.
command-cooldown-seconds: 30
# Synchronize Discord roles whenever a player joins.
sync-on-join: true
# Synchronization interval in minutes.
# Set this to 0 to disable periodic synchronization.
periodic-sync-minutes: 10
# Remove the account link if the member leaves the Discord server.
unlink-on-discord-leave: true
roles:
# Remove configured Discord roles when the matching
# LuckPerms group is no longer assigned.
remove-unmapped-managed-roles: true
# Remove all roles managed by vLink when an account is unlinked.
remove-managed-roles-on-unlink: true
# Optional role assigned to every linked Discord member.
# Leave empty to disable it.
linked-role-id: "PUT_LINKED_ROLE_ID_HERE"
# LuckPerms group name: Discord role ID
group-role-map:
vip: "PUT_VIP_ROLE_ID_HERE"
admin: "PUT_ADMIN_ROLE_ID_HERE"
nickname-sync:
# Synchronize the Discord nickname with the Minecraft name.
enabled: false
# Available placeholder: {player}
format: "{player}"
评论 0
登录后参与评分
还没有评论,来抢沙发吧