Link

插件

· 作者 HuskyDreaming

LINK 是一款快速、安全且轻量的插件,允许玩家链接他们的 Minecraft 账号

0 本站下载 0 关注 更新于 6 个月前

最新 1.0.4 · 26.1.2 · Velocity

一键开服(送7天)

✔ Spigot 支持 ✔ Folia 支持 ✔ Velocity 支持


概览

LINK 是一款快速、安全且轻量的插件,允许玩家使用简单的验证码将 Minecraft 账号与 Discord 绑定。专为性能打造,为真实服务器设计。

外部库会在首次启动时自动下载并本地缓存——使插件 JAR 包体积保持在 90 KB 以下。

功能特性

  • ✅ 快速绑定 — 即时生成并验证代码
  • ✅ 安全系统 — 安全且经过验证的账号绑定机制
  • ✅ 开发者 API — 简洁易用的集成支持
  • ✅ 轻量级 — 约 90 KB 的插件,按需下载依赖库
  • ✅ 平台支持 — 兼容 Spigot、Folia 和 Velocity
  • ✅ Discord 角色同步 — 绑定后自动分配指定角色
  • ✅ 易于设置 — 几分钟内即可运行
  • ✅ 多数据库支持 — H2(默认)、SQLite、MySQL、MariaDB 和 PostgreSQL
  • ✅ 可配置日志记录 — 可在配置文件中控制 HikariCP 和 JDA 的日志级别
  • ✅ 热重载 — 通过 /link reload 命令重载配置文件而无需重启服务器

工作原理

  1. 在 Minecraft 中运行 /link
  2. 获取唯一验证码
  3. 在 Discord 中输入该验证码
  4. 账号即时绑定成功

安装步骤

  1. 将插件放入 /plugins 文件夹
  2. 启动服务器(首次运行时会自动下载依赖库)
  3. 在 discord.yml 中配置你的机器人 Token、服务器 ID(Guild ID)和角色 ID
  4. 如果需要远程数据库,请配置 database.yml(H2 开箱即用)
  5. 在任何 Discord 频道中键入 /setup
  6. 完成

配置说明

database.yml
# Link - Database Configuration
#
# Driver: sqlite | h2 | mysql | mariadb | postgresql (default: h2)
driver: h2

# File-based database path — relative to the plugin's data folder.
# The subfolder is created automatically. Only used when driver is 'sqlite' or 'h2'.
file: "h2/link"

# Remote connection settings (ignored for SQLite and H2)
host: "localhost"
port: 3306
name: "link"
username: "user"
password: "password"
pool:
  maximum-pool-size: 10
  minimum-idle: 2
  connection-timeout: 10000
  idle-timeout: 600000
  max-lifetime: 1800000
  keepalive-time: 60000
discord.yml
# Link - Discord Bot Configuration

# Your Discord bot token. Get this from the Discord Developer Portal:
# https://discord.com/developers/applications → Bot → Reset Token
# Keep this secret — never share it or commit it to version control.
token: ""

# The ID of the Discord server (guild) the bot operates in.
# To get this: enable Developer Mode in Discord settings,
# then right-click your server name → Copy Server ID.
guild-id: 0

# The ID of the role to assign when a player links their account.
# Right-click the role in Server Settings → Roles → Copy Role ID.
# The bot's role must be positioned ABOVE this role in the role hierarchy.
role-id: 0

# Customise the embed posted by the /setup command in Discord.
embed:
  title: "Account Linking"
  description: "Link your account to get in-game rewards!"
  color: "#97BA52"
  button-label: "✅ Authenticate Account"
  fields:
    - name: "Linking Guide:"
      value: " - Launch Minecraft\n - Join the server: `play.server.com`\n - Run `/link`\n - Enter your Auth Code in #link"
      inline: false
    - name: "Linking Rewards:"
      value: " - ? 100 Gold\n - ? 10 Gems"
      inline: false
config.yml — Velocity
# Seconds a player must wait before re-linking after unlinking
cooldown: 3600

# Log level overrides (OFF, ERROR, WARN, INFO, DEBUG, TRACE)
logging:
  hikari: WARN
  jda: WARN

# Per-backend-server commands. %player% is replaced with the player's username.
servers:
  survival:
    link-commands:
      - "say %player% has linked their account!"
    unlink-commands:
      - "say %player% has unlinked their account!"
config.yml — Spigot / Folia (standalone)
# mode: velocity-bridge | standalone
mode: standalone

cooldown: 3600

logging:
  hikari: WARN
  jda: WARN

link-commands:
  - "say %player% has linked their account!"
unlink-commands:
  - "say %player% has unlinked their account!"

命令列表

命令 描述 平台
/link 生成绑定验证码 Velocity / Spigot / Folia
/link reload 实时重载所有配置文件 Velocity / Spigot / Folia
/unlink 解绑账号 Velocity / Spigot / Folia
/setup 在频道中发布绑定嵌入消息 Discord

开发者 API

  • 访问已绑定账号的数据
  • 监听绑定事件
  • 轻松扩展功能

技术支持

GitHub: HuskyDreaming/Link — 完整文档及源代码。

本插件已在以下服务器展示(可在此测试):play.wilden.fun


简单 • 快速 • 可靠

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源