Core2FA — 双重身份验证
? 概述
Core2FA 是一款适用于 Minecraft(Spigot、Paper、PurPur、Folia)的插件,通过 Telegram 实现双重身份验证。
它要求玩家通过绑定的 Telegram 账号确认登录,从而保护玩家账号免受劫持。
借助 Telegram 集成,玩家可以轻松地在手机上管理账号安全。
✨ 功能
-
账号绑定
玩家可以将自己的 Minecraft 账号与 Telegram 账号绑定,以增强安全性。
-
登录确认
当玩家加入服务器时,他们会收到一条 Telegram 通知,并可以批准或拒绝该登录请求。
-
远程安全控制
通过交互式的 Telegram 菜单,玩家可以:
- 批准或拒绝登录。
- 如果检测到可疑活动,则封锁自己的账号 (若已启用此功能)。
- 解绑自己的账号 (若服务器管理员允许)。
- 使用
/menu 命令在 Telegram 中访问所有设置,远程管理自己的账号。
-
可配置选项
支持自定义语言、通知中的服务器名称,以及细粒度的权限控制。
-
Folia 支持
针对基于 Folia 的服务器进行了优化,确保运行流畅。
⚙ 安装设置
- 将插件放入
/plugins 文件夹。
- 启动服务器以生成配置文件。
- 编辑
config.yml:
server-name: "MyServer" # Telegram 通知中显示的服务器名称
language: "en" # 插件语言
telegram:
bot-token: "BOT_TOKEN_HERE" # 你的 Telegram 机器人令牌
bot-username: "NAME_BOT" # 机器人的用户名
telegram-menu:
settings:
allow-unlinking: false # 是否允许解绑账号
allow-remote-ban: false # 是否允许远程封禁
- 重启服务器。
- 玩家可以使用
/2fa 来绑定自己的账号。
? 指令
| 指令 |
别名 |
描述 |
/2fa |
/tfa, /auth |
用于管理 2FA 的主要指令 |
/2fa reload |
— |
重新加载插件配置 |
/menu (Telegram) |
— |
打开交互式 Telegram 菜单,以便远程管理账号 |
? 权限
| 权限 |
描述 |
twofa.reload |
重新加载插件配置(仅限 OP 使用) |
? 兼容性
- 平台: Spigot, Paper, PurPur, Folia
- Java: 17+
? 使用示例
- 玩家加入服务器。
- 他们收到一条 Telegram 消息:“确认登录到 MyServer?”
- 他们点击“确认”或“拒绝”。
- 登录请求被允许或阻止。
- 玩家可以在 Telegram 中使用
/menu 来管理安全设置或解绑账号。
- 服务器管理员可以使用
/2fa reload 来应用配置更改,而无需重启服务器。
? 许可证
MIT 许可证 —— 可免费使用、分享或修改。
Core2FA — Two-Factor Authentication
? Overview
Core2FA is a Minecraft plugin (Spigot, Paper, PurPur, Folia) for that adds two-factor authentication through Telegram.
It protects player accounts from hijacking by requiring login confirmation through a linked Telegram account.
With Telegram integration, players can manage their account security quickly and easily from their phone.
✨ Features
-
Account Linking
Players can link their Minecraft account to their Telegram account for extra security.
-
Login Confirmation
When a player joins, they receive a Telegram notification and can approve or deny the login.
-
Remote Security Controls
Through an interactive Telegram menu, players can:
- Approve or deny logins.
- Block their account if suspicious activity is detected (if enabled).
- Unlink their account (if allowed by the server admin).
- Access all settings using the
/menu command in Telegram to manage their account remotely.
-
Configurable Options
Adjustable language, custom server name in notifications, and fine-grained permission controls.
-
Folia Support
Optimized to run smoothly on Folia-based servers.
⚙ Setup
- Place the plugin into your
/plugins folder.
- Start the server to generate configuration files.
- Edit
config.yml:
server-name: "MyServer" # Name displayed in Telegram notifications
language: "en" # Plugin language
telegram:
bot-token: "BOT_TOKEN_HERE" # Your Telegram bot token
bot-username: "NAME_BOT" # Your bot’s username
telegram-menu:
settings:
allow-unlinking: false # Allow unlinking accounts
allow-remote-ban: false # Allow remote banning
- Restart the server.
- Players can use
/2fa to link their account.
? Commands
| Command |
Aliases |
Description |
/2fa |
/tfa, /auth |
Main command to manage 2FA |
/2fa reload |
— |
Reloads the plugin configuration |
/menu (Telegram) |
— |
Opens the interactive Telegram menu to manage account remotely |
? Permissions
| Permission |
Description |
twofa.reload |
Reloads the plugin configuration (OPs only) |
? Compatibility
- Platform: Spigot, Paper, PurPur, Folia
- Java: 17+
? Example Usage
- A player joins the server.
- They receive a Telegram message: "Confirm login to MyServer?"
- They press "Confirm" or "Deny".
- The login is either allowed or blocked.
- Players can use
/menu in Telegram to manage security settings or unlink their account.
- Server admins can use
/2fa reload to apply configuration changes without restarting.
? License
MIT License – free to use, share, or modify.
评论 0
登录后参与评分
还没有评论,来抢沙发吧