? MyLogin
MyLogin 是一款轻量级的 Minecraft Paper 服务器身份验证与账户保护插件。
它提供基于密码的身份验证、从 Passky 迁移、离线模式账户保护、重复会话保护以及管理员账户管理工具。
? 项目背景
MyLogin 旨在作为 Passky 的现代替代方案,允许服务器所有者继续使用现有的玩家登录数据,同时保持与当前 Paper 版本的兼容性。
该插件支持迁移现有的 Passky SHA-256 密码数据,使玩家在迁移后能够保留其原有密码。
✨ 功能特性
- 基于密码的玩家身份验证
- 支持 Passky SHA-256 数据迁移
- 可配置的登录超时时间
- 最大登录尝试次数保护
- 可选的基于 IP 的自动登录
- 登出支持
- 管理员密码管理
- 登录前的失明效果保护
- 成功登录后的烟花特效
- 离线模式服务器的用户名大小写保护
- 重复会话保护
- 用户名冲突检测与报告
- 基于 YAML 的数据存储
- 配置迁移支持
? 依赖要求
- 服务端:Paper
- 支持版本:1.21.x
- Java:21+
兼容性说明
MyLogin 仅使用标准的 Bukkit/Paper API,不使用 NMS 或 CraftBukkit 内部实现。
因此,该插件预计可在较新的 Paper 构建版本上运行,包括当前的 26.1.x 版本,但官方仅正式支持 Paper 1.21.x。
? 玩家命令
| 命令 |
描述 |
/register <password> <password> |
注册新账户 |
/login <password> |
登录你的账户 |
/changepassword <old> <new> |
修改你的密码 |
/logout |
退出当前会话 |
? 管理员命令
| 命令 |
权限 |
描述 |
/migrate |
mylogin.admin |
迁移 Passky 用户数据 |
/resetpassword <player> <newpassword> |
mylogin.admin |
重置玩家的密码 |
/deleteplayer <player> |
mylogin.admin |
删除玩家的账户 |
/mylogin reload |
mylogin.admin |
重新加载配置 |
/mylogin scannamecollisions |
mylogin.admin |
扫描 users.yml 中的用户名大小写冲突 |
/mylogin checkplayer <player> |
mylogin.admin |
查看玩家登录信息 |
/mylogin stats |
mylogin.admin |
查看 MyLogin 统计数据 |
⚙️ 配置
示例:
login-timeout-seconds: 300
max-login-attempts: 5
min-password-length: 4
max-password-length: 32
ip-remember: true
ip-remember-timeout: 86400
effects:
blind: true
firework: true
security:
enforce-name-case: false
scan-name-collisions-on-startup: true
block-duplicate-sessions: true
migration:
skip-existing-users: true
? 用户名大小写保护
离线模式服务器会将不同大小写的用户名视为不同的账户。
示例:
SkyBuilder
SKYBUILDER
sKyBuIlDeR
启用时:
security:
enforce-name-case: true
玩家必须使用最初注册时完全相同的大小写形式重新连接。
示例:
已注册:
SkyBuilder
尝试加入:
SKYBUILDER
结果:
此名称已注册为 'SkyBuilder'。
请使用该确切名称重新连接。
这有助于防止以下问题:
- 重复的物品栏
- 重复的经济账户
- 重复的地块所有权
- 重复的权限
- 重复的备份记录
? 重复会话保护
启用时:
security:
block-duplicate-sessions: true
如果玩家已经在线:
SkyBuilder
且有另一个客户端尝试使用以下名称连接:
SkyBuilder
则新连接将被拒绝,原始玩家保持在线状态。
? 用户名冲突扫描器
启用时:
security:
scan-name-collisions-on-startup: true
MyLogin 会扫描 users.yml 中的用户名大小写冲突。
示例:
SkyBuilder
SKYBUILDER
sKyBuIlDeR
结果将写入:
plugins/MyLogin/data/name-collision-log.yml
? 从 Passky 迁移
要求:
- Passky 编码器必须为 SHA-256
- 玩家标识符必须使用玩家名称
MyLogin 可以导入现有的 Passky 账户,无需玩家重新注册。
迁移相关文件:
plugins/MyLogin/Migration/old-users.yml
plugins/MyLogin/Migration/migration-log.yml
迁移保护设置:
migration:
skip-existing-users: true
默认情况下,现有的 MyLogin 账户不会被覆盖。
? 数据存储
主要数据文件:
plugins/MyLogin/data/users.yml
plugins/MyLogin/data/name-collision-log.yml
plugins/MyLogin/Migration/old-users.yml
plugins/MyLogin/Migration/migration-log.yml
? 许可证
MIT License
? MyLogin
MyLogin is a lightweight authentication and account-protection plugin for Minecraft Paper servers.
It provides password-based authentication, migration from Passky, offline-mode account protection, duplicate session protection, and administrative account management tools.
? Project Background
MyLogin was created as a modern alternative to Passky, allowing server owners to continue using existing player login data while maintaining compatibility with current Paper releases.
The plugin supports migration of existing Passky SHA-256 password data, allowing players to keep their existing passwords after migration.
✨ Features
- Password-based player authentication
- Passky SHA-256 migration support
- Configurable login timeout
- Maximum login attempt protection
- Optional IP-based auto-login
- Logout support
- Admin password management
- Blindness protection before login
- Firework effect after successful login
- Username case protection for offline-mode servers
- Duplicate session protection
- Username collision detection and reporting
- YAML-based storage
- Configuration migration support
? Requirements
- Server: Paper
- Supported Versions: 1.21.x
- Java: 21+
Compatibility Notes
MyLogin uses only the standard Bukkit/Paper API and does not use NMS or CraftBukkit internals.
Because of this, the plugin is expected to work on newer Paper builds, including current 26.1.x releases, but only Paper 1.21.x is officially supported.
? Player Commands
| Command |
Description |
/register <password> <password> |
Register a new account |
/login <password> |
Log into your account |
/changepassword <old> <new> |
Change your password |
/logout |
Log out of your current session |
? Admin Commands
| Command |
Permission |
Description |
/migrate |
mylogin.admin |
Migrate Passky user data |
/resetpassword <player> <newpassword> |
mylogin.admin |
Reset a player's password |
/deleteplayer <player> |
mylogin.admin |
Delete a player's account |
/mylogin reload |
mylogin.admin |
Reload configuration |
/mylogin scannamecollisions |
mylogin.admin |
Scan users.yml for username case collisions |
/mylogin checkplayer <player> |
mylogin.admin |
View player login information |
/mylogin stats |
mylogin.admin |
View MyLogin statistics |
⚙️ Configuration
Example:
login-timeout-seconds: 300
max-login-attempts: 5
min-password-length: 4
max-password-length: 32
ip-remember: true
ip-remember-timeout: 86400
effects:
blind: true
firework: true
security:
enforce-name-case: false
scan-name-collisions-on-startup: true
block-duplicate-sessions: true
migration:
skip-existing-users: true
? Username Case Protection
Offline-mode servers treat usernames with different capitalization as different accounts.
Examples:
SkyBuilder
SKYBUILDER
sKyBuIlDeR
When enabled:
security:
enforce-name-case: true
Players must reconnect using the exact username capitalization originally registered.
Example:
Registered:
SkyBuilder
Joining:
SKYBUILDER
Result:
This name is already registered as 'SkyBuilder'.
Please reconnect using that exact name.
This helps prevent:
- Duplicate inventories
- Duplicate economy accounts
- Duplicate claims
- Duplicate permissions
- Duplicate backup records
? Duplicate Session Protection
When enabled:
security:
block-duplicate-sessions: true
If a player is already online:
SkyBuilder
and another client attempts to connect using:
SkyBuilder
the new connection is denied and the original player remains online.
? Username Collision Scanner
When enabled:
security:
scan-name-collisions-on-startup: true
MyLogin scans users.yml for username case collisions.
Example:
SkyBuilder
SKYBUILDER
sKyBuIlDeR
Results are written to:
plugins/MyLogin/data/name-collision-log.yml
? Migration From Passky
Requirements:
- Passky encoder must be SHA-256
- Player identifier must use player names
MyLogin can import existing Passky accounts without requiring players to register again.
Migration files:
plugins/MyLogin/Migration/old-users.yml
plugins/MyLogin/Migration/migration-log.yml
Migration protection:
migration:
skip-existing-users: true
Existing MyLogin accounts are not overwritten by default.
? Data Storage
Main data files:
plugins/MyLogin/data/users.yml
plugins/MyLogin/data/name-collision-log.yml
plugins/MyLogin/Migration/old-users.yml
plugins/MyLogin/Migration/migration-log.yml
? License
MIT License
评论 0
登录后参与评分
还没有评论,来抢沙发吧