Link2It 将玩家的 Minecraft 账号与其 Discord 账号关联,并利用该关联保护你的服务器。当工作人员加入时,确认卡片会发送至其 Discord。在他们批准之前,无法移动、聊天或执行命令。已关联的玩家将获得其 Discord 角色和奖励,并且 LuckPerms 组与 Discord 角色在两个方向上保持同步。
同一个 jar 文件可在 Paper 和 Spigot 上运行。
语言: 插件默认附带土耳其语版本。聊天消息、屏幕界面和 Discord 卡片均源自 messages.yml,可以进行翻译。Discord 斜杠命令名称及少数固定回复仍保留为土耳其语。本页面的土耳其语版本位于底部。
账号关联
玩家在游戏中的 /esle(或 /link)输入后,屏幕上会出现一个 6 位代码。在 Discord 的关联频道中,他们点击链接按钮并在弹出的表单中输入该代码。代码绝不会发布在频道中,因此其他人看不到它。/esle <code> 斜杠命令同样有效。
一旦关联成功,玩家将获得 Discord 角色,昵称更改为其游戏内名称,并触发奖励命令。奖励每个账号仅发放一次;解绑并重新关联不会再次发放奖励。
两个可选设置:
link.required:未关联的玩家仍可加入服务器,但无法移动。他们会留在游戏中以便将代码发送到 Discord,一旦完成关联,限制会自动解除。
link.confirm-in-game:在 Discord 中输入代码后,系统会在游戏中询问玩家该 Discord 账号是否属于自己。如果工作人员在直播中展示其代码,观众无法将该账号绑定到自己的 Discord 上。
工作人员的双因素登录
操作员以及拥有 link2it.2fa.required 权限的玩家在加入时会被冻结。带有“批准”、“拒绝”和“拒绝并屏蔽 IP”按钮的卡片会发送至他们的 Discord 私聊消息中,或者如果他们关闭了私聊,则发送至安全频道。如果登录被拒绝,配置中定义的防御命令将执行,并将玩家踢出服务器。
如果无法连接 Discord,有两个备用方案:来自身份验证应用的 TOTP 代码,或一次性备份代码。在 TOTP 设置期间,QR 码会绘制在玩家手中的地图上进行扫描。由于秘密密钥存储在地图上,因此不会被丢弃、放入箱子或因死亡而丢失。
诸如 /op、/ban 和 /stop 等命令在执行前需要 Discord 批准;列表见配置文件。从已批准的连接返回的工作人员在 30 天内不会再被要求确认。
TOTP 密钥使用 AES-256-GCM 进行加密。密钥存储在 plugins/Link2It/.key 中,因此即使数据库备份泄露也不会暴露任何人的 TOTP。IP 地址从不以明文形式存储,仅存储其哈希值。
角色同步与提升奖励
安装 LuckPerms 后,你可以将游戏内的组与 Discord 角色配对。在游戏中赋予的组会作为角色出现在 Discord 上,在 Discord 上赋予的角色会作为组出现在游戏中,移除操作也会在两个方向上同步。
提升你 Discord 服务器的成员会在游戏中加入一个组,并解锁三层奖励菜单。每个层级只能领取一次。Discord 不会告诉机器人成员提升了多少次,因此层级是根据你服务器上的角色(如“2x Booster”)读取的。如果你没有设置任何角色,所有提升者都算作第 1 层。
管理
/link2it panel 允许直接从游戏内更改几乎所有设置,频道和角色列表会从 Discord 实时获取。保存设置时,只会重写 config.yml 中对应的行;你的注释保持不变。
面板的每个部分都有各自的权限,因此 moderator 可以编辑关联设置,而 2FA 设置保持锁定。涉及控制台命令的设置(奖励、拒绝命令、角色映射)只能通过 link2it.admin 更改。面板还包含玩家卡片和审计日志。
屏幕使用 Minecraft 1.21.6 中添加的对话框窗口。通过 ui.mode: CHEST 可切换至容器菜单;当需要输入代码或数值时,玩家在聊天中输入,且消息不会显示给任何人。
安装步骤
- 在 Discord Developer Portal 创建应用,并从 Bot 标签页复制令牌。
- 如果使用角色同步或提升奖励,请开启“Server Members Intent”。关联和双因素登录无需此选项即可工作。
- 邀请机器人时选择
bot 和 applications.commands 作用域,并授予 Send Messages、Manage Roles 和 Manage Nicknames 权限。将机器人的角色置于其将要分发的角色之上。
- 将 jar 文件放入
plugins/ 目录并启动服务器。首次启动时,服务器会从 Maven Central 下载 JDA 和数据库驱动程序。
- 在
plugins/Link2It/config.yml 中填写令牌、服务器 ID 和频道 ID,然后运行 /link2it yenile。
- 使用
/link2it panel-gonder 将关联面板发布到其频道。
命令
| 适用对象 |
命令 |
| 玩家 |
/esle (/link)、/esle coz、/dogrula <code> (/verify)、/2fa (/twofactor)、/boost |
| 工作人员 |
/link2it panel、durum、yenile、panel-gonder、bilgi、coz、liste、odul、onayla、ip-engel-kaldir、/2fa sifirla <player> |
| Discord |
/esle <code>、/hesabim、/coz、/l2i kim、/l2i coz、/l2i durum、/l2i senkron |
土耳其语词汇含义:coz = 解绑,durum = 状态,yenile = 重载,panel-gonder = 发送面板,bilgi = 信息,liste = 列表,odul = 奖励,onayla = 批准,ip-engel-kaldir = 解除 IP 屏蔽,sifirla = 重置,hesabim = 我的账号,kim = 谁,senkron = 同步。
PlaceholderAPI:%link2it_linked%、%link2it_discord%、%link2it_discord_id%、%link2it_date%、%link2it_2fa%、%link2it_boost%、%link2it_total%。也可以使用土耳其语名称(esli、tarih、toplam)。
需求
- Paper 或 Spigot 26.2,Java 25
- 一个 Discord 机器人
- 可选:LuckPerms、PlaceholderAPI
- SQLite(无需设置),或 MySQL/MariaDB 用于跨服务器共享数据
- 首次启动时需访问 Maven Central
Türkçe
Link2It 将玩家的 Minecraft 账户与 Discord 账户绑定,并利用该绑定来保护你的服务器。当获得权限的玩家加入服务器时,系统会向其 Discord 发送一个验证卡片;在通过验证之前,玩家无法移动、聊天或执行命令。完成绑定的玩家将自动获得对应的 Discord 角色及奖励,LuckPerms 用户组也会与 Discord 角色实现双向同步。
该插件兼容 Paper 和 Spigot,所有文本均为土耳其语,且可通过 messages.yml 文件进行修改。
账户绑定
玩家在游戏内输入 /esle,屏幕上会显示一个 6 位验证码。随后,玩家需在 Discord 的绑定频道中点击“Hesabını Eşle”(绑定账户)按钮,并在弹出的窗口中输入该代码。此代码不会发送到频道中,因此不会被他人看到。除了按钮操作外,玩家也可以在 Discord 中使用 /esle <code> 命令进行绑定。
绑定成功后,玩家将获得相应的 Discord 角色,其昵称将更改为游戏内的用户名,并触发奖励指令。每个账户仅发放一次奖励;解绑后重新绑定不会再次获得奖励。
以下设置选项为可选:
- 如果
link.required 开启,无法匹配的玩家虽然可以进入服务器,但无法移动。他们会在原地等待,直到获取代码并在 Discord 中完成绑定;匹配完成后锁将自动解除。
- 如果
link.confirm-in-game 开启,当代码在 Discord 中被输入时,系统会向玩家询问“这是你的账号吗?”。这样可以防止有人看到正在展示代码的管理员账号后,将自己的 Discord 与该账号绑定。
管理员的双因素验证
拥有 OP 权限或 link2it.2fa.required 权限的管理员在登录时会暂停操作。他们的 Discord 上会收到一张卡片,包含“确认”、“拒绝”和“拒绝 + 屏蔽 IP”按钮。如果登录被拒绝,配置文件中的防御命令将会执行并将玩家踢出。
如果无法联系到 Discord,还有两种备选方案:使用 Authenticator 应用生成 TOTP 代码,或使用一次性备用代码。TOTP 设置过程中,二维码会被打印在一张地图上交给玩家,玩家需用手机扫描。由于地图包含了密钥信息,它不能被丢弃在地上、放入箱子或在死亡时掉落。
在执行 /op、/ban、/stop 等命令之前,系统会要求 Discord 授权;该命令列表可从配置文件中修改。已通过验证的连接重新登录的管理员,在 30 天内不会再被重复询问。
TOTP 密钥通过 AES-256-GCM 进行加密。加密密钥存储在 plugins/Link2It/.key 文件中,即使数据库备份泄露,也无法解密 TOTP 设置。IP 地址不会以明文形式写入数据库,仅保留其摘要。
角色同步与奖励加成
如果已安装 LuckPerms,你可以将游戏中的一个游戏组与 Discord 中的一个角色关联起来。在游戏中分配的游戏组会作为角色出现在 Discord 上,而在 Discord 中分配的角色会作为游戏组出现在游戏中;获得的权限在两端都会同步生效。
为服务器提供 Boost(提升)的用户会自动加入游戏中的一个组,并解锁一个三级的奖励菜单。每个等级只能领取一次。由于 Discord 无法直接告知具体有多少次 Boost,因此等级是根据你服务器上已有的角色(例如“2x Booster”等角色)来读取的。如果你没有定义任何角色,那么所有进行 Boost 的用户将被视为第 1 级。
管理
/link2it panel 允许你在游戏内更改几乎所有设置;频道和角色列表会从 Discord 实时获取。保存的设置仅修改 config.yml 中的对应行,注释保持不变。
面板的每个部分都有各自的权限;你可以允许管理员开启映射设置但关闭两步验证(2FA)。涉及控制台命令的设置(如奖励、拒绝命令、角色匹配)仅能由拥有 link2it.admin 权限的用户进行修改。此外,面板中还包含玩家卡片和控制日志功能。
屏幕是 Minecraft 1.21.6 引入的窗口界面。通过设置 ui.mode: CHEST 可以切换到箱子式菜单;在需要输入代码或值的地方,玩家需在聊天中输入回复,该消息不会发送给任何人。
安装
- 在 Discord Developer Portal 创建一个应用,并在 Bot 选项卡中获取 Token。
- 如果使用角色同步或 Boost 奖励功能,请启用 Server Members Intent(服务器成员意图)。对于映射和两步验证功能则不需要。
- 使用
bot 和 applications.commands 作用域,以及 Send Messages(发送消息)、Manage Roles(管理角色)和 Manage Nicknames(管理昵称)权限将机器人邀请到你的服务器。确保机器人的角色位于其将要赋予的角色的上方。
- 将 Jar 文件放入
plugins/ 文件夹,然后启动服务器。首次启动时,JDA 和数据库驱动将从 Maven Central 下载。
- 在
plugins/Link2It/config.yml 中填写 Token、服务器 ID 和频道 ID,然后执行 /link2it yenile。
- 运行
/link2it panel-gonder 将映射面板发送到指定频道。
命令
| 权限 |
命令 |
| 玩家 |
/esle, /esle coz, /dogrula <kod>, /2fa, /boost |
| 管理员 |
/link2it panel, durum, yenile, panel-gonder, bilgi, coz, liste, odul, onayla, ip-engel-kaldir, /2fa sifirla <oyuncu> |
| Discord |
/esle <kod>, /hesabim, /coz, /l2i kim, /l2i coz, /l2i durum, /l2i senkron |
PlaceholderAPI 占位符:%link2it_esli%, %link2it_discord%, %link2it_discord_id%, %link2it_tarih%, %link2it_2fa%, %link2it_boost%, %link2it_toplam%。英文名称同样有效(linked, date, total)。
要求
- Paper 或 Spigot 26.2,Java 25
- 一个 Discord 机器人
- 可选:LuckPerms、PlaceholderAPI
- SQLite(无需安装)或多服务器环境下的 MySQL/MariaDB
- 首次启动时需要访问 Maven Central
Link2It links a player's Minecraft account to their Discord account and uses that link to protect your server. When a staff member joins, a confirmation card goes to their Discord. Until they approve it, they can't move, chat or run commands. Linked players get their Discord role and rewards, and LuckPerms groups stay in sync with Discord roles in both directions.
The same jar runs on Paper and Spigot.
Language: the plugin ships in Turkish. Chat messages, screens and Discord cards come from messages.yml and can be translated. Discord slash command names and a few fixed replies stay in Turkish. A Turkish version of this page is at the bottom.
Account linking
The player types /esle (or /link) in game and a 6-digit code appears on screen. In the linking channel on Discord, they press the link button and type the code into the form that opens. The code is never posted in the channel, so nobody else sees it. The /esle <code> slash command works as well.
Once linked, the player gets the Discord role, their nickname changes to their in-game name, and the reward commands run. Rewards are given once per account; unlinking and linking again doesn't pay out a second time.
Two optional settings:
link.required: unlinked players can join but can't move. They stay in so they can take the code to Discord, and the lock lifts by itself once the link is made.
link.confirm-in-game: after the code is entered on Discord, the player is asked in game whether that Discord account is theirs. If a staff member shows their code on stream, a viewer can't bind the account to their own Discord.
Two-factor login for staff
Operators and anyone with link2it.2fa.required are frozen when they join. A card with approve, deny and "deny and block IP" buttons arrives in their Discord DMs, or in the security channel if their DMs are closed. If the login is denied, the defense commands from the config run and the player is kicked.
If Discord can't be reached, there are two fallbacks: a TOTP code from an authenticator app, or single-use backup codes. During TOTP setup the QR code is drawn on a map in the player's hand and scanned with a phone. The map carries the secret, so it can't be dropped, put in a chest or lost on death.
Commands such as /op, /ban and /stop need Discord approval before they run; the list is in the config. A staff member who comes back from an approved connection isn't asked again for 30 days.
TOTP secrets are encrypted with AES-256-GCM. The key lives in plugins/Link2It/.key, so a leaked database backup doesn't expose anyone's TOTP. IP addresses are never stored as they are, only their hashes.
Role sync and boost rewards
With LuckPerms installed, you can pair an in-game group with a Discord role. A group given in game appears as a role on Discord, a role given on Discord appears as a group in game, and removals carry over both ways.
Members who boost your Discord server join a group in game and unlock a three-tier reward menu. Each tier can be claimed once. Discord doesn't tell bots how many boosts a member has, so the tier is read from roles on your server such as "2x Booster". If you don't set any, every booster counts as tier 1.
Management
/link2it panel changes nearly every setting from inside the game, with channel and role lists pulled live from Discord. Saving a setting rewrites only its own line in config.yml; your comments stay where they are.
Each section of the panel has its own permission, so a moderator can edit linking settings while 2FA stays locked. Settings that run console commands (rewards, deny commands, role mappings) can only be changed with link2it.admin. The panel also has player cards and an audit log.
Screens use the dialog windows added in Minecraft 1.21.6. With ui.mode: CHEST they switch to chest menus; when a code or value is needed, the player types it in chat and the message isn't shown to anyone.
Setup
- Create an application in the Discord Developer Portal and copy the token from the Bot tab.
- If you'll use role sync or boost rewards, turn on the Server Members Intent. Linking and 2FA work without it.
- Invite the bot with the
bot and applications.commands scopes and the Send Messages, Manage Roles and Manage Nicknames permissions. Move the bot's role above the roles it will give out.
- Put the jar in
plugins/ and start the server. On the first start the server downloads JDA and the database drivers from Maven Central.
- Fill in the token, server ID and channel IDs in
plugins/Link2It/config.yml, then run /link2it yenile.
- Post the linking panel to its channel with
/link2it panel-gonder.
Commands
| Who |
Commands |
| Players |
/esle (/link), /esle coz, /dogrula <code> (/verify), /2fa (/twofactor), /boost |
| Staff |
/link2it panel, durum, yenile, panel-gonder, bilgi, coz, liste, odul, onayla, ip-engel-kaldir, /2fa sifirla <player> |
| Discord |
/esle <code>, /hesabim, /coz, /l2i kim, /l2i coz, /l2i durum, /l2i senkron |
What the Turkish words mean: coz = unlink, durum = status, yenile = reload, panel-gonder = post panel, bilgi = info, liste = list, odul = reward, onayla = approve, ip-engel-kaldir = lift IP block, sifirla = reset, hesabim = my account, kim = who, senkron = sync.
PlaceholderAPI: %link2it_linked%, %link2it_discord%, %link2it_discord_id%, %link2it_date%, %link2it_2fa%, %link2it_boost%, %link2it_total%. The Turkish names (esli, tarih, toplam) work too.
Requirements
- Paper or Spigot 26.2, Java 25
- A Discord bot
- Optional: LuckPerms, PlaceholderAPI
- SQLite (no setup needed), or MySQL/MariaDB to share data between servers
- Access to Maven Central on the first start
Türkçe
Link2It oyuncunun Minecraft hesabını Discord hesabına bağlar ve bu bağı sunucunu korumak için kullanır. Yetkili biri sunucuya girdiğinde Discord'una bir onay kartı gider; onaylamadan yürüyemez, konuşamaz, komut çalıştıramaz. Eşleyen oyuncu Discord rolünü ve ödüllerini alır, LuckPerms grupları da Discord rolleriyle iki yönde eşitlenir.
Aynı jar Paper'da ve Spigot'ta çalışır. Bütün metinler Türkçe ve messages.yml dosyasından değiştirilebilir.
Hesap eşleme
Oyuncu oyunda /esle yazar, ekranda 6 haneli bir kod çıkar. Discord'daki eşleme kanalında "Hesabını Eşle" butonuna basar ve kodu açılan pencereye girer. Kod kanala hiç yazılmaz, başkası göremez. Buton yerine Discord'da /esle <kod> komutu da çalışır.
Eşleme kurulunca oyuncu Discord rolünü alır, takma adı oyun adıyla değişir ve ödül komutları çalışır. Ödül hesap başına bir kez verilir; eşlemeyi kaldırıp yeniden eşlemek ikinci ödülü getirmez.
İki ayar isteğe bağlı:
link.required açıksa eşlemeyen oyuncu sunucuya girer ama yerinden kıpırdayamaz. Kodu alıp Discord'da girebilsin diye içeride bekler; eşleme tamamlanınca kilit kendiliğinden açılır.
link.confirm-in-game açıksa kod Discord'da girilince oyuncuya "bu hesap senin mi?" diye sorulur. Yayında kodunu gösteren bir yetkilinin hesabını, kodu gören biri kendi Discord'una bağlayamaz.
Yetkililer için iki adımlı doğrulama
OP'ler ve link2it.2fa.required izni olanlar girişte donar. Discord'larına Onayla, Reddet ve Reddet + IP engelle butonlu bir kart gelir. Giriş reddedilirse config'teki savunma komutları çalışır ve oyuncu atılır.
Discord'a ulaşılamazsa iki yol daha var: Authenticator uygulamasından TOTP kodu ya da tek kullanımlık yedek kodlar. TOTP kurulumunda QR kod oyuncunun eline verilen bir haritaya basılır, telefonla okutulur. Harita gizli anahtarı taşıdığı için yere atılamaz, sandığa konamaz, ölünce düşmez.
/op, /ban, /stop gibi komutlar çalışmadan önce Discord onayı ister; liste config'ten değiştirilir. Onaylanmış bir bağlantıdan yeniden giren yetkiliye 30 gün boyunca tekrar sorulmaz.
TOTP anahtarları AES-256-GCM ile şifrelenir. Şifreleme anahtarı plugins/Link2It/.key dosyasında durur, veritabanı yedeği sızsa bile TOTP kurulumları açılamaz. IP adresleri veritabanına ham yazılmaz, yalnızca özetleri tutulur.
Rol senkronu ve takviye ödülleri
LuckPerms kuruluysa bir oyun grubunu bir Discord rolüne bağlayabilirsin. Oyunda verilen grup Discord'da rol olarak gelir, Discord'da verilen rol oyunda grup olarak; alınan rol de iki tarafta alınır.
Sunucuyu takviye (boost) edenler oyunda bir gruba girer ve üç kademeli bir ödül menüsü açar. Her kademe bir kez alınır. Discord kimin kaç takviye bastığını söylemediği için kademe, sunucundaki "2x Booster" gibi rollerden okunur. Hiç rol tanımlamazsan takviye yapan herkes 1. kademe sayılır.
Yönetim
/link2it panel ayarların neredeyse hepsini oyunun içinden değiştirir; kanal ve rol listeleri Discord'dan canlı gelir. Kaydedilen ayar config.yml'de yalnızca kendi satırını değiştirir, yorumlar yerinde kalır.
Panelin her bölümünün kendi izni var; bir moderatöre eşleme ayarlarını açıp 2FA'yı kapalı tutabilirsin. Konsol komutu çalıştıran ayarları (ödüller, reddetme komutları, rol eşleşmeleri) yalnızca link2it.admin değiştirebilir. Panelde ayrıca oyuncu kartları ve denetim kaydı var.
Ekranlar Minecraft 1.21.6 ile gelen pencerelerdir. ui.mode: CHEST ile sandık menüsüne geçilebilir; kod ya da değer gereken yerde oyuncu cevabını sohbete yazar, mesaj kimseye gitmez.
Kurulum
- Discord Developer Portal'da bir uygulama aç, Bot sekmesinden tokeni al.
- Rol senkronu ya da takviye ödülleri kullanacaksan Server Members Intent'i aç. Eşleme ve 2FA için gerekmez.
- Botu
bot ve applications.commands kapsamlarıyla, Send Messages, Manage Roles ve Manage Nicknames yetkileriyle sunucuna davet et. Botun rolünü, vereceği rollerin üstüne taşı.
- Jar'ı
plugins/ klasörüne at, sunucuyu başlat. İlk açılışta JDA ve veritabanı sürücüleri Maven Central'dan iner.
plugins/Link2It/config.yml içine tokeni, sunucu ve kanal kimliklerini yaz, sonra /link2it yenile.
/link2it panel-gonder ile eşleme panelini kanala gönder.
Komutlar
| Kim |
Komutlar |
| Oyuncu |
/esle, /esle coz, /dogrula <kod>, /2fa, /boost |
| Yetkili |
/link2it panel, durum, yenile, panel-gonder, bilgi, coz, liste, odul, onayla, ip-engel-kaldir, /2fa sifirla <oyuncu> |
| Discord |
/esle <kod>, /hesabim, /coz, /l2i kim, /l2i coz, /l2i durum, /l2i senkron |
PlaceholderAPI: %link2it_esli%, %link2it_discord%, %link2it_discord_id%, %link2it_tarih%, %link2it_2fa%, %link2it_boost%, %link2it_toplam%. İngilizce adlar da çalışır (linked, date, total).
Gereksinimler
- Paper ya da Spigot 26.2, Java 25
- Bir Discord botu
- İsteğe bağlı: LuckPerms, PlaceholderAPI
- SQLite (kurulum istemez) ya da birden fazla sunucu için MySQL/MariaDB
- İlk açılışta Maven Central'a erişim
评论 0
登录后参与评分
还没有评论,来抢沙发吧