注册与登录插件
一款轻量级的离线模式服务器注册与登录插件,用于防止离线服务器中的账号被盗。
Discord 展示页
✨ 功能特性
-
注册系统
命令:/register <password> <confirmPassword>
未注册的玩家无法移动或聊天,且只能运行注册命令。输入的两次密码必须一致。注册成功后玩家将自动登录。
-
登录系统
命令:/login <password>
已注册的玩家加入服务器时会处于锁定状态,无法移动或聊天。输入正确密码后所有限制将解除。
OP(管理员)可运行 /login update 在 Modrinth 上检查新版本。update 的 Tab 补全仅对操作员可见。
-
修改密码
命令:/changepassword <oldPassword> <newPassword>
玩家必须先登录才能修改密码。
-
持久化数据存储
玩家账号和密码保存在 plugins/RegisterAndLoginPlugin/accounts/PlayerUUID.txt。
账号文件以玩家 UUID 为文件名,因此即使玩家更改游戏内用户名,账号也不会丢失。所有数据在服务器重启后依然保留。
-
安全保护
如果玩家在加入服务器后 60 秒内未能登录,将被踢出。密码以 SHA‑256 哈希值存储,而非明文。
-
自定义消息
所有游戏内消息均可在 lang.yml 中进行修改。
⚙️ 支持的服务器
✅ Paper 1.21.x
✅ Purpur 1.21.x
❌ 不兼容 Spigot、Fabric。
? 版本更新日志
v1.0.1: 添加了密码哈希加密
v1.2.0: 添加了 /changepassword 命令;添加了仅限 OP 使用的 /login update 版本检查器;为 /login update 添加了 Tab 补全(仅对操作员可见);代码优化。
计划中的功能:离线玩家 2 天自动登录。
? 开源信息
本项目基于 MIT 许可证开源
源代码仓库:
欢迎反馈和提交拉取请求以改进此插件。
# Register And Login Plugin
Lightweight offline‑mode server registration & login plugin to prevent account theft on offline servers.
Discord showcase
✨ Features
-
Registration System
Command: /register <password> <confirmPassword>
Unregistered players cannot move or chat, and may only run the register command. The two entered passwords must match. Players will be logged in automatically upon successful registration.
-
Login System
Command: /login <password>
Registered players join the server in a locked state, unable to move or chat. All restrictions will be lifted after entering the correct password.
OPs can run /login update to check for new versions on Modrinth. Tab‑completion for update is only visible to operators.
-
Change Password
Command: /changepassword <oldPassword> <newPassword>
Players must log in first before modifying their password.
-
Persistent Data Storage
Player accounts and passwords are saved at plugins/RegisterAndLoginPlugin/accounts/PlayerUUID.txt.
Account files use player UUID as filename, so accounts will not be lost even if players change their in‑game username. All data survives server restarts.
-
Security Protection
Players will be kicked if they fail to log in within 60 seconds after joining. Passwords are stored as SHA‑256 hashes instead of plain text.
-
Customizable Messages
All in‑game messages can be modified inside lang.yml.
⚙️ Supported Servers
✅ Paper 1.21.x
✅ Purpur 1.21.x
❌ Not compatible with Spigot, Fabric.
? Version Changelog
v1.0.1: Added password hash encryption
v1.2.0: Added /changepassword command; Added OP‑only /login update version checker; Added tab‑completion for /login update (only visible to operators); Code optimization.
Planned features: 2‑day auto‑login for offline players.
? Open Source Information
This project is open‑sourced under the MIT License
Source Repository:
Feedback and pull requests are welcome to improve this plugin.
评论 0
登录后参与评分
还没有评论,来抢沙发吧