🔐 AuthSystem
一款轻量级、安全登录与注册插件,适用于 Paper 和 Folia,支持 1.21 至 26.x+ 版本。
AuthSystem 保护你服务器上的玩家账号(非常适合离线模式/盗版服务器)。每位玩家必须进行一次 /register 注册,之后每次加入服务器时都需要 /login 登录。在登录之前,他们无法移动、聊天、执行命令或与世界进行交互。
✨ 功能特性
- ✅ Paper & Folia:完全线程安全,基于区域/实体调度器构建
- ✅ Minecraft 1.21 – 26.x+:一个 jar 包适配所有版本
- 🔒 安全的密码:使用 PBKDF2-SHA256 哈希算法并配合随机盐值(旧账号会自动升级)
- ⚡ 无延迟:哈希计算和保存操作均在主线程之外运行
- 🧊 登录后解锁:登录前禁止移动、聊天、命令、方块交互、物品操作、背包管理、PvP 或受到伤害
- ⏱️ 登录超时:超时后踢出玩家,并循环显示剩余时间的提醒
- 🚫 暴力破解防护:输入错误密码次数超过 X 次后踢出玩家
- 🛠️ 管理员命令:可从游戏内或控制台重置账号和更改密码
- 📁 简单的存储方式:所有数据存储在
players.yml 中,无需数据库
- 🪶 轻量级:单个小型 jar 包,无任何依赖项
📜 命令
| 命令 |
描述 |
/register <密码> <密码> |
创建账号(别名:/reg) |
/login <密码> |
登录(别名:/l) |
/changepassword <旧密码> <新密码> <新密码> |
修改密码(别名:/changepass、/cp) |
/verify reload |
重新加载配置文件和 players.yml |
/verify reset <玩家> |
删除某玩家的账号 |
| /verify changepass <玩家> <密码> | 为玩家设置新密码 |
🔑 权限
| 权限 |
描述 |
默认值 |
verify.admin |
访问 /verify 管理命令 |
OP |
⚙️ 配置
# 玩家加入服务器后,登录或注册所需的超时时间(秒)。
login-timeout: 120
enable-kick-on-timeout: true
# 提醒重复的频率(以秒为单位)。0 = 仅提醒一次。
reminder-interval: 15
min-password-length: 4
max-password-length: 64
messages:
timeout-kick: "你未在限定时间内登录!"
login-reminder: "输入 &e/login <密码> &f进行登录!(剩余 {time} 秒)"
register-reminder: "输入 &e/register <密码> <密码> &f创建账户!(剩余 {time} 秒)"
login-attempts:
enabled: true
max-attempts: 5
reset-on-success: true
kick-message: "密码尝试次数过多!请稍后再试。"
支持使用 & 符号的颜色代码。
📦 安装
- 下载 jar 文件并将其放入你的
plugins/ 文件夹中。
- 启动服务器(Paper 或 Folia,1.21+)。需要 Java 21 或更高版本。
- 如需修改,请编辑
plugins/AuthSystem/config.yml,然后运行 /verify reload。
从 1.0 版升级? 直接替换新的 jar 文件即可。现有的账号和配置将继续正常工作,并且玩家的密码将在下次登录时自动升级为新的哈希算法。
💬 支持
发现 Bug 或有新想法?请留下评论或提交 Issue。欢迎反馈!
🔐 AuthSystem
A lightweight, secure login & register plugin for Paper and Folia, from 1.21 to 26.x+.
AuthSystem protects player accounts on your server (great for offline-mode / cracked servers). Every player has to /register once and then /login each time they join. Until they log in, they can't move, chat, run commands or touch the world.
✨ Features
- ✅ Paper & Folia: fully thread-safe, built on the region/entity schedulers
- ✅ Minecraft 1.21 – 26.x+: one jar for every version
- 🔒 Secure passwords: PBKDF2-SHA256 hashing with a random salt (old accounts are upgraded automatically)
- ⚡ No lag: hashing and saving run off the main thread
- 🧊 Full lock until login: no moving, chat, commands, blocks, items, inventory, PvP or damage
- ⏱️ Login timeout with a kick and repeating reminders showing the time left
- 🚫 Brute-force protection: kick after X wrong passwords
- 🛠️ Admin commands: reset accounts and change passwords, from in-game or the console
- 📁 Simple storage: everything lives in
players.yml, with no database needed
- 🪶 Lightweight: a single small jar with no dependencies
📜 Commands
| Command |
Description |
/register <password> <password> |
Create an account (alias: /reg) |
/login <password> |
Log in (alias: /l) |
/changepassword <old> <new> <new> |
Change your password (aliases: /changepass, /cp) |
/verify reload |
Reload config and players.yml |
/verify reset <player> |
Delete a player's account |
/verify changepass <player> <password> |
Set a new password for a player |
🔑 Permissions
| Permission |
Description |
Default |
verify.admin |
Access to /verify admin commands |
OP |
⚙️ Configuration
# Time in seconds that a player has to log in or register after joining the server.
login-timeout: 120
enable-kick-on-timeout: true
# How often (in seconds) the reminder is repeated. 0 = only once.
reminder-interval: 15
min-password-length: 4
max-password-length: 64
messages:
timeout-kick: "You didn't log in within the time limit!"
login-reminder: "Type &e/login <password> &fto log in! (You have {time} seconds left)"
register-reminder: "Type &e/register <password> <password> &fto create an account! (You have {time} seconds left)"
login-attempts:
enabled: true
max-attempts: 5
reset-on-success: true
kick-message: "Too many wrong password attempts! Try again later."
Color codes with & are supported.
📦 Installation
- Download the jar and put it in your
plugins/ folder.
- Start the server (Paper or Folia, 1.21+). Java 21 or newer is required.
- Edit
plugins/AuthSystem/config.yml if you want, then run /verify reload.
Updating from 1.0? Drop in the new jar. Existing accounts and the config keep working, and passwords are upgraded to the new hashing on the player's next login.
💬 Support
Found a bug or have an idea? Leave a comment or open an issue. Feedback is welcome!
评论 0
登录后参与评分
还没有评论,来抢沙发吧