PinGuard
PinGuard 是一款专为 原版 Minecraft 服务器 打造的轻量级登录系统——无需模组、无需插件,仅依靠一个数据包即可运行。
它专为 离线模式(盗版)服务器 设计,在这类服务器中任何人都可以使用任意昵称加入。PinGuard 要求每位玩家注册一个 PIN 码,并在每次加入时输入该代码,从而防止他人冒用你的身份进行游戏。
✨ 功能特性
- ? 使用 PIN 码注册与登录(4–9 位数字),通过简洁的弹窗完成——无需在聊天栏输入命令
- ? 登录后方可行动——未登录的玩家将被置于旁观者模式,无法移动、观察或交互
- ? 位置信息不丢失——登录成功后,玩家将精确返回其原来的位置、维度、视角方向和游戏模式
- ? 随时更改 PIN 码:通过 Esc → 账户 菜单即可操作
- ? 支持 10 种语言,由每位玩家自行选择:English, Українська, Русский, Polski, Deutsch, Español, Français, Português, Türkçe, 简体中文
- ?️ 防暴力破解保护——连续 5 次错误尝试将触发 60 秒锁定,管理员会收到通知
- ? PIN 码绝不以明文存储——仅保存加盐哈希值
- ? 聊天界面整洁——隐藏“Triggered [...]”提示消息
? 安装方法
- 下载与你 Minecraft 版本匹配的版本
- 将
.zip 文件放入 world/datapacks/ 目录
- 重启服务器(或执行
/reload 命令)
至此安装完成——玩家在下次加入时将看到注册窗口。
?️ 管理员命令
| 操作 |
命令 |
| 获取管理员通知 |
/tag <player> add auth.admin |
| 重置在线玩家的 PIN 码 |
/execute as <player> run function auth:admin/reset |
| 重置离线玩家的 PIN 码 |
/scoreboard players reset <player> auth.reg |
| 在移除数据包前解锁所有玩家 |
/function auth:admin/uninstall |
⚠️ 限制说明(请务必阅读)
原版数据包存在硬性限制,请注意以下几点:
- 仅限数字。由于原版机制只能通过对话框向数据包传递数字,因此 PIN 码必须为 4–9 位纯数字——不支持字母。
- 无星号掩码。输入框会在打字时显示实际数字(原版对话框不支持隐藏输入)。
- 禁用命令反馈。为隐藏“Triggered”提示,数据包会将整个服务器的
send_command_feedback 游戏规则关闭。但错误消息仍会正常显示。你可以通过 /gamerule send_command_feedback true(1.21.11 之前版本为 sendCommandFeedback)重新开启。
- 无法阻止命令执行。如果有人使用管理员昵称加入,他们在登录前仍可执行 OP 命令。在离线模式服务器上,请勿将 OP 权限授予其他用户可能使用的昵称——或使用白名单机制。
- 不能替代在线模式。如果你的服务器能够运行在线模式,那始终是最安全的选择。
? 环境要求
- Minecraft Java Edition 1.21.6 或更高版本(对话框功能于 1.21.6 引入)
- 适用于任何支持数据包的服务器:原版、Aternos、Paper、Fabric 等
- 玩家无需安装任何额外内容
PinGuard
PinGuard is a lightweight login system for vanilla Minecraft servers — no mods, no plugins, just a data pack.
It's made for offline-mode (cracked) servers, where anyone can join with any nickname. PinGuard makes every player register a PIN code and enter it each time they join, so nobody can play under someone else's name.
✨ Features
- ? Register & log in with a PIN (4–9 digits) in a clean pop-up window — no chat commands to type
- ? Frozen until logged in — unauthorized players are put in spectator mode, can't move, see or interact
- ? Nothing is lost — after login the player returns to their exact position, dimension, view direction and game mode
- ? Change your PIN anytime via Esc → Account
- ? 10 languages, chosen by each player: English, Українська, Русский, Polski, Deutsch, Español, Français, Português, Türkçe, 简体中文
- ?️ Brute-force protection — 5 wrong attempts → 60-second lockout, admins get notified
- ? PINs are never stored as plain text — only salted hashes
- ? Clean chat — hides the "Triggered [...]" message
? Installation
- Download the version that matches your Minecraft version
- Put the
.zip into world/datapacks/
- Restart the server (or run
/reload)
That's it — players will see the registration window on their next join.
?️ Admin commands
| Action |
Command |
| Get admin notifications |
/tag <player> add auth.admin |
| Reset a player's PIN (online) |
/execute as <player> run function auth:admin/reset |
| Reset a player's PIN (offline) |
/scoreboard players reset <player> auth.reg |
| Unlock everyone before removing the pack |
/function auth:admin/uninstall |
⚠️ Limitations (please read)
Vanilla data packs have hard limits, so be aware:
- Digits only. Vanilla can only pass numbers from a dialog to a data pack, so PINs are 4–9 digits — no letters.
- No asterisks. The input field shows the digits while typing (vanilla dialogs don't support hidden input).
- Disables command feedback. To hide the "Triggered" message, the pack turns off the
send_command_feedback game rule for the whole server. Error messages still show. You can turn it back on with /gamerule send_command_feedback true (or sendCommandFeedback before 1.21.11).
- Doesn't block commands. If someone joins with an operator's nickname, they can still run OP commands before logging in. On offline-mode servers, don't give OP to names others could use — or use a whitelist.
- Not a replacement for online mode. If your server can run in online mode, that's always more secure.
? Requirements
- Minecraft Java Edition 1.21.6 or newer (dialogs were added in 1.21.6)
- Works on any server that supports data packs: vanilla, Aternos, Paper, Fabric, etc.
- Players don't need to install anything
评论 0
登录后参与评分
还没有评论,来抢沙发吧