SuperLogin
专为离线模式 Minecraft 服务器设计的轻量级认证插件,具备虚空世界隔离、数学验证码以及通过 Telegram 机器人实现的双因素认证(2FA)。
支持 Spigot 1.21.11+(Java 21)。
功能
-
虚空世界隔离 — 玩家在验证期间会被传送至一个独立的空虚无世界。登录前无法与主世界进行交互。
-
注册与登录 — /register <password> <confirm> 和 /login <password>。密码采用 BCrypt 哈希加密。
-
命令拦截 — 在身份验证期间,所有命令均被禁用。玩家无法与游戏世界交互、发送聊天消息或使用任何命令,仅 /login 和 /register 可用。
-
数学验证码 — 注册前可选的数学验证码。难度可配置:
-
Level 2(更难):包含乘法和除法,数字更大
-
双重身份验证(2FA) — 支持按玩家配置 Telegram 机器人进行双重身份验证。玩家将账号与机器人关联,每次登录都需通过机器人确认。
-
机器人控制 — 通过 Telegram 机器人,玩家可以:
- 批准 / 拒绝 登录尝试(显示 IP 地址)
- 踢出 玩家离开服务器
- 结束会话(断开玩家连接)
- 阻止 / 解除阻止访问(自动踢出任何尝试登录的人)
-
服务器统计信息 — 直接在 Telegram 机器人中查看在线玩家数量、TPS 和内存使用情况。
-
服务器名称 — 可在机器人消息中显示的自定义服务器名称。
-
安全禁用两步验证 — 禁用两步验证需要通过机器人进行确认,以防止未经授权的更改。
-
多语言支持 — 内置俄语和英语翻译。在 config.yml 中更改语言。
-
Boss 条计时器 — 身份验证和验证码超时的可视化倒计时。
-
标签列表隐藏 — 未认证的玩家将从标签列表中隐藏。
-
兼容反飞行检测 — 玩家在进行身份验证时不会被反作弊系统踢出。
-
无游戏内管理员命令 — 所有设置仅通过配置文件进行管理。
安装方法
- 下载
SuperLogin-1.1.0.jar
- 将其放入服务器的
plugins/ 文件夹中
- 启动服务器
- 配置文件将在
plugins/SuperLogin/ 中生成
前置要求
- Spigot 1.21.11 或兼容分支(Paper、Purpur 等)
- Java 21 或以上版本
- 离线模式(在
server.properties 中将 online-mode 设置为 false)
配置说明
所有设置均通过配置文件进行管理。本插件不提供任何管理员命令——请编辑文件并重启服务器即可生效。
主配置文件 (config.yml)
# 插件语言(俄语 / 英语)
language: ru
# 服务器名称(显示在 Telegram 机器人消息中)
server-name: "Minecraft Server"
# 是否在首次加入时启用数学验证码
captcha-enabled: false
# 验证码难度:
# 1 — 简单(加减法,数字不超过 20)
# 2 — 较难(乘除法,数字更大)
captcha-difficulty: 1
身份验证超时(秒)
auth-time: 30
验证码超时(秒)
captcha-time: 15
两步验证确认超时(秒)
2fa-time: 40
虚空身份验证世界的名称
auth-world: superlogin_auth
### 2FA 配置 (`2fa.yml`)
两步验证在单独的文件中进行配置。Telegram 机器人默认处于禁用状态。
---
## 设置 Telegram 机器人
1. 打开 Telegram 并找到 **@BotFather**
2. 发送 `/newbot` 并按照提示操作
3. 复制 BotFather 提供的 **API 令牌**
4. 编辑 `plugins/SuperLogin/2fa.yml`:
```yaml
telegram:
enabled: true
token: "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
bot-username: "YourBotUsername"
- 重启服务器
2FA 工作原理
绑定
- 在
2fa.yml 中启用 Telegram 机器人并重启服务器
- 登录后,玩家输入
/2fa connect
- 插件生成一个一次性代码(有效期为 5 分钟)
- 玩家使用命令
/2fa confirm <code> 将该代码发送给机器人
- 机器人确认绑定 — 完成!
使用 2FA 登录
- 玩家输入
/login <password>
- 如果密码正确且启用了 2FA,Telegram 机器人会收到一条确认请求,显示玩家的 IP 地址 和 服务器名称
- 玩家在机器人中点击 Approve → 登录完成
- 当玩家离开服务器时,机器人会显示“Player left the game”
机器人控制
确认登录后,机器人会显示以下按钮:
| 按钮 |
操作 |
| ? Kick |
将玩家从服务器踢出 |
| ? End Session |
断开玩家连接并结束其会话 |
| ? Block Access |
阻止该账户 — 任何尝试登录的人都会被立即踢出。按钮变为 Unblock Access |
| ✅ Unblock Access |
移除阻止,允许再次登录 |
机器人功能
- 服务器统计信息 — 按下 “? Статистика сервера” 查看在线玩家、TPS 和内存使用情况。按下 “? Обновить” 刷新数据。
- 欢迎消息 — 向机器人发送
/start 以获取设置说明。
禁用 2FA
当玩家输入 /2fa disable 时,会向机器人发送一条确认请求。玩家必须通过机器人确认此操作,以防止未经授权的禁用。
命令
| 命令 |
描述 |
/register <password> <confirm> |
注册新账户 |
/login <password> |
登录你的账户 |
/2fa connect |
绑定你的 Telegram 账户用于 2FA |
/2fa status |
查看你的 2FA 状态 |
/2fa disable |
禁用 2FA(需要机器人确认) |
文件结构
plugins/SuperLogin/
├── config.yml # 主要设置(语言、服务器名称、验证码、超时时间)
├── 2fa.yml # Telegram 机器人配置
├── 2fa-data.yml # 玩家 2FA 数据(自动生成)
├── players.yml # 玩家密码(自动生成)
├── lang_ru.yml # 俄语翻译
└── lang_en.yml # 英语翻译
认证流程
玩家加入
↓
[账号被屏蔽?] → 立即踢出
↓
传送至虚空认证世界
↓
[如果启用了验证码] → 解答数学题
↓
新玩家? → /register <pass> <confirm>
老玩家? → /login <pass>
↓
[如果启用了双因素认证] → 通过 Telegram 机器人确认
↓ 显示 IP 地址 + 服务器名称
传送回主世界
常见问题
问:玩家在认证过程中可以使用命令吗?
答:不可以。除 /login 和 /register 外,所有命令均被拦截。
问:如果双因素认证确认超时怎么办?
答:在配置好的超时时间后(默认:40 秒),玩家会被踢出。他们可以重新连接并重试。
问:所有玩家都必须启用双因素认证吗?
答:不需要。双因素认证是可选的。玩家在登录后自行使用 /2fa connect 启用它。
问:“屏蔽访问”有什么作用?
答:它会屏蔽 Minecraft 账号。任何使用该用户名加入服务器的玩家都会被立即踢出。按钮会切换为“解除屏蔽访问”,以便您移除屏蔽。
问:管理员能通过聊天更改设置吗?
答:不能。所有设置仅存在于配置文件中。编辑 config.yml 或 2fa.yml 并重启服务器即可。
问:如何更改语言?
答:在 config.yml 中将 language: ru 改为 language: en,然后重启服务器。
问:如何更改机器人消息中的服务器名称?
答:在 config.yml 中编辑 server-name,然后重启服务器。
兼容性
- Spigot 1.21.11+
- Paper 1.21.11+(可能不兼容)
- Purpur 1.21.11+
- Java 21+
工作原理
您可以在为其创建的官方服务器上查看该插件的运行情况。
SuperLogin
Lightweight authentication plugin for offline-mode Minecraft servers with void world isolation, math captcha, and two-factor authentication (2FA) via Telegram bot.
Supports Spigot 1.21.11+ (Java 21).
Features
- Void World Isolation — Players are teleported to a separate empty void world during authentication. No interaction with the main world until logged in.
- Registration & Login —
/register <password> <confirm> and /login <password>. Passwords are hashed with BCrypt.
- Command Blocking — All commands are blocked during authentication. Players cannot interact with the world, chat, or use any commands except
/login and /register.
- Math Captcha — Optional math captcha before registration. Configurable difficulty:
- Level 1 (easy): Addition and subtraction, numbers up to 20
- Level 2 (harder): Multiplication and division included, larger numbers
- Two-Factor Authentication (2FA) — Optional per-player 2FA via Telegram bot. Players link their accounts and must confirm each login through the bot.
- Bot Controls — From the Telegram bot, players can:
- Approve / Deny login attempts (with IP address shown)
- Kick the player from the server
- End session (disconnect the player)
- Block / Unblock access (auto-kick anyone who tries to log in)
- Server Statistics — View online players, TPS, and RAM usage directly in the Telegram bot.
- Server Name — Configurable server name displayed in bot messages.
- Disable 2FA Safely — Disabling 2FA requires confirmation through the bot to prevent unauthorized changes.
- Multi-language — Built-in Russian and English translations. Change the language in
config.yml.
- Boss Bar Timer — Visual countdown for authentication and captcha timeouts.
- Tab List Hiding — Unauthenticated players are hidden from the tab list.
- Anti-Fly Compatible — Players won't be kicked by anti-cheat while in the auth world.
- No In-Game Admin Commands — All settings are managed through configuration files only.
Installation
- Download
SuperLogin-1.1.0.jar
- Place it in your server's
plugins/ folder
- Start the server
- Configuration files will be generated in
plugins/SuperLogin/
Requirements
- Spigot 1.21.11 or compatible fork (Paper, Purpur, etc.)
- Java 21+
- Offline mode (
online-mode=false in server.properties)
Configuration
All settings are managed through configuration files only. There are no admin commands — edit the files and restart the server.
Main Config (config.yml)
# Plugin language (ru / en)
language: ru
# Server name (displayed in Telegram bot messages)
server-name: "Minecraft Server"
# Enable/disable math captcha on first join
captcha-enabled: false
# Captcha difficulty:
# 1 — easy (addition, subtraction, numbers up to 20)
# 2 — harder (multiplication, division, larger numbers)
captcha-difficulty: 1
# Authentication timeout in seconds
auth-time: 30
# Captcha timeout in seconds
captcha-time: 15
# 2FA confirmation timeout in seconds
2fa-time: 40
# Name of the void authentication world
auth-world: superlogin_auth
2FA Config (2fa.yml)
Two-factor authentication is configured in a separate file. The Telegram bot is disabled by default.
Setting Up Telegram Bot
- Open Telegram and find @BotFather
- Send
/newbot and follow the instructions
- Copy the API token BotFather gives you
- Edit
plugins/SuperLogin/2fa.yml:
telegram:
enabled: true
token: "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
bot-username: "YourBotUsername"
- Restart the server
How 2FA Works
Linking
- Enable the Telegram bot in
2fa.yml and restart the server
- After logging in, a player types
/2fa connect
- The plugin generates a one-time code (valid for 5 minutes)
- The player sends this code to the bot using the command:
/2fa confirm <code>
- The bot confirms the link — done!
Login with 2FA
- Player enters
/login <password>
- If password is correct and 2FA is enabled, the Telegram bot receives a confirmation request showing the player's IP address and the server name
- Player clicks Approve in the bot → login completes
- When the player leaves the server, the bot shows "Player left the game"
Bot Controls
After confirming login, the bot shows these buttons:
| Button |
Action |
| ? Kick |
Kicks the player from the server |
| ? End Session |
Disconnects the player and ends their session |
| ? Block Access |
Blocks the account — anyone who tries to log in gets kicked immediately. Button changes to Unblock Access |
| ✅ Unblock Access |
Removes the block, allows login again |
Bot Features
- Server Statistics — Press "? Статистика сервера" to see online players, TPS, and RAM usage. Press "? Обновить" to refresh.
- Welcome Message — Send
/start to the bot for setup instructions.
Disabling 2FA
When a player types /2fa disable, a confirmation request is sent to the bot. The player must confirm the action through the bot to prevent unauthorized disabling.
Commands
| Command |
Description |
/register <password> <confirm> |
Register a new account |
/login <password> |
Log into your account |
/2fa connect |
Link your Telegram account for 2FA |
/2fa status |
View your 2FA status |
/2fa disable |
Disable 2FA (requires bot confirmation) |
File Structure
plugins/SuperLogin/
├── config.yml # Main settings (language, server name, captcha, timeouts)
├── 2fa.yml # Telegram bot configuration
├── 2fa-data.yml # Player 2FA data (auto-generated)
├── players.yml # Player passwords (auto-generated)
├── lang_ru.yml # Russian translations
└── lang_en.yml # English translations
Authentication Flow
Player joins
↓
[Account blocked?] → Kicked immediately
↓
Teleported to void auth world
↓
[If captcha enabled] → Solve math problem
↓
New player? → /register <pass> <confirm>
Returning? → /login <pass>
↓
[If 2FA enabled] → Confirm via Telegram bot
↓ IP address + server name shown
Teleported back to main world
FAQ
Q: Can players use commands while authenticating?
A: No. All commands except /login and /register are blocked.
Q: What happens if 2FA confirmation times out?
A: The player is kicked after the configured timeout (default: 40 seconds). They can reconnect and try again.
Q: Is 2FA required for all players?
A: No. 2FA is opt-in. Players enable it themselves with /2fa connect after logging in.
Q: What does "Block Access" do?
A: It blocks the Minecraft account. Anyone who joins with that username will be kicked immediately. The button toggles to "Unblock Access" so you can remove the block.
Q: Can admins change settings from chat?
A: No. All settings are in config files only. Edit config.yml or 2fa.yml and restart the server.
Q: How do I change the language?
A: Edit language: ru to language: en in config.yml and restart the server.
Q: How do I change the server name in bot messages?
A: Edit server-name in config.yml and restart the server.
Compatibility
- Spigot 1.21.11+
- Paper 1.21.11+ (may be incompatible)
- Purpur 1.21.11+
- Java 21+
How it works
You can see the plugin's operation on the official server for which it was created.
评论 0
登录后参与评分
还没有评论,来抢沙发吧