NameBound 是一款仅适用于服务器的 Minecraft 1.21.1 Fabric 模组,它为每个已验证的 Minecraft 账户提供一次性的角色身份。
账户名为 Maxello1 的玩家可创建角色 John Smith。在默认姓氏模式下,普通玩家会在该玩家头顶、玩家列表以及签名聊天中的发送者名称处看到 John S.。死亡时会发布匿名消息 Someone died.(某人死了),删除该角色,并在重生后要求创建新角色。
本模组仅使用原版界面和协议包。玩家可使用未修改的 Minecraft 1.21.1 客户端加入服务器。
重要限制
此功能仅遮蔽界面;并未实现协议层面的匿名化。
NameBound 绝不会更改玩家的已验证 GameProfile、Minecraft 用户名、UUID、皮肤属性、聊天会话、公钥或认证数据。这些值仍作为登录、封禁、白名单、权限、选择器和服务端管理的权威依据。
原版的网络通信必然在 player-info 数据包中发送真实的 profile 名称和 UUID,而用于隐藏私人标签的分队 scoreboard team 中也包含真实的 profile 名称。NameBound 替换了未修改客户端通常会渲染的可选 display-name 组件,但经过修改的客户端、感知协议的代理服务器或能够检查会话的网络观察者仍可还原出 Minecraft 用户名。NameBound 提供的是面向角色扮演(RP)的 UI 遮蔽,而非密码学意义上的匿名性。请勿将其用作安全边界,也不要向玩家承诺数据包中不存在账户名称。
原版 scoreboard teams 是严格的兼容性边界
一个玩家只能属于一个原版 scoreboard team。NameBound 需要为每个账户创建一个私有的 team,以便在发送针对查看者的虚拟标签之前隐藏原始的玩家名签。
existingTeamBehaviour 控制与非 NameBound 分队的冲突:
WARN_AND_OVERRIDE(默认)记录警告并将账户移至其 NameBound 分队。之前的分队成员资格及其附加的任何机制将丢失。
WARN_AND_SKIP 记录警告并保持现有分队不变。此时 NameBound 无法隐藏原版名签。客户端可能会同时显示虚拟角色标签和原始用户名,导致双重标签及可见的用户名泄露。
请慎重选择。依赖 scoreboard teams 来实现阵营、颜色、碰撞、友军伤害、小游戏或权限的服务端,在部署前需测试此交互行为。
特性
每个已验证 UUID 仅有一个活跃角色;不支持玩家重命名或角色切换命令。
持久化的全局角色状态跨维度共享,包括角色生成历史、活跃名称所有权、姓氏模式、可选的死亡名称预留以及管理员偏好设置。
强制遵循原版 GUI 流程:名字铁砧 → 姓氏铁砧 → 确认箱子。
创建锁定:阻止正常聊天、无关命令、破坏方块、攻击以及方块/实体/物品使用。还可提供临时无敌并重新打开关闭的创建界面。
基于 Unicode 码点的完整名称长度限制:名字 + 一个空格 + 姓氏最多不超过 16 个码点。
不区分大小写的活跃名称唯一性、可配置的黑名单、标题式大小写规范化,以及可选的 Unicode、撇号和连字符支持。
全局 SHORTENED(John S.)和 FULL(John Smith)姓氏显示模式,保存在世界存档中。
仅限数据包传输的头顶文本显示、玩家列表和签名聊天装饰中使用针对查看者的名称。
授权的管理员可选择角色的名称或真实用户名,且不会改变其他任何查看者的显示。
窄范围死亡消息替换:保留原版死亡处理逻辑,随后删除角色并进行私有服务端日志记录。
提供管理检查、重置、设置、重载、标签清理和身份查找命令。
要求和安装
NameBound 专为以下确切的项目版本构建:
组件 要求
Minecraft Java Edition 服务端 1.21.1
Java 21 或更高版本
Fabric Loader 0.16.14 或更高版本
Fabric API 基于 0.116.13+1.21.1 构建并测试
多人游戏 客户端模组 加入专用服务器时无需安装
在专用服务器上安装步骤:
为 Minecraft 1.21.1 专用服务器安装 Fabric Loader。
将 Fabric API 0.116.13+1.21.1 和 namebound-1.0.1.jar 放入服务端的 mods 目录。
使用 Java 21 启动服务端。NameBound 首次运行时会创建 config/namebound.json。
停止服务端,审查生成的配置文件——特别是 existingTeamBehaviour——然后重新启动。
在已有服务端的初次使用前请备份世界。角色状态存储在主世界的持久化世界数据中。
加入专用 NameBound 服务器的客户端无需安装本模组。然而,要在单人模式中体验或测试 NameBound,则需在对应的客户端配置文件中同时安装 NameBound 和 Fabric API:因为 Minecraft 单人的集成服务端运行在客户端进程内,所以 Fabric 必须在此处加载该 jar 包。NameBound 仍不包含任何客户端功能代码,所有用户交互均使用原版客户端能力。
单人模式工作流程
玩家加入服务器。NameBound 在全局世界状态中查找已认证账户的 UUID。
如果不存在活跃角色,玩家进入创建锁定状态。玩家列表显示“正在创建角色…”,短暂延迟后打开第一个原版铁砧界面。
玩家依次输入名和姓。每一步都会验证其输入。
确认箱子会显示完整的公开姓名,并附带警告:身份无法更改,死亡将删除该身份。玩家可以确认或重新开始。
确认操作会重新验证整个姓名,并在服务器线程上原子性地创建记录。重复点击不会创建第二个活跃记录。
正常游戏恢复。特定于查看者的角色名称会被发送到聊天栏、玩家列表以及附近的虚拟名称标签。
一次完整的死亡会触发一条配置好的通用消息,并在原版死亡处理完成后删除活跃角色。图腾激活不计入死亡,因为玩家并未完成死亡流程。
重生或下次重连将重新开始创建过程。账户的角色生成计数递增。维度传送不会导致角色被删除。
未完成的创建会话仅存在于内存中。在创建过程中断开连接会导致下次加入时从头开始流程。
姓名规则
默认设置强制执行以下所有规则:
名和姓各自至少包含 2 个码位。
包括分隔空格在内的完整标准化姓名不得超过 16 个 Unicode 码位。
接受 ASCII 字母;除非进行配置,否则禁用 Unicode 字母。
启用时,仅允许在内部使用撇号和连字符。
拒绝任何名字部分内部的空格、首尾标点符号、§ 符号、控制/格式字符、换行符、制表符、零宽字符以及文本组件格式化内容。
姓名会被标准化并采用标题大小写(o'connor 变为 O'Connor;smith-jones 变为 Smith-Jones)。
在标准化且不区分大小写的比较下,活跃的完整姓名必须是唯一的。
黑名单条目为标准化后的完整姓名。
当原版 GUI 不可用时,/character create <firstName> <lastName> 作为备用命令。它仅在玩家没有活跃角色时才能成功执行。
NameBound is a server-only Fabric mod for Minecraft 1.21.1 that gives each authenticated Minecraft account one character identity for one life.
A player whose account name is Maxello1 can create John Smith. In the default surname mode, ordinary players see John S. above the player, in the player list, and as the sender name in signed chat. Death publishes the anonymous message Someone died., deletes that character, and requires a new character after respawn.
The mod uses only vanilla screens and packets. Players can join with an unmodified Minecraft 1.21.1 client.
Important limits
This masks the interface; it does not anonymize the protocol
NameBound never changes a player's authenticated GameProfile, Minecraft username, UUID, skin properties, chat session, public key, or authentication data. Those values remain authoritative for login, bans, whitelists, permissions, selectors, and server administration.
Vanilla networking necessarily sends the real profile name and UUID in player-info data, and the private nametag-hiding scoreboard team contains the real profile name. NameBound replaces the optional display-name components that an unmodified client normally renders, but a modified client, protocol-aware proxy, or network observer able to inspect the session can recover Minecraft usernames. NameBound provides roleplay-oriented UI masking, not cryptographic anonymity. Do not use it as a security boundary or promise players that account names are absent from packets.
Vanilla scoreboard teams are a hard compatibility boundary
A player can belong to only one vanilla scoreboard team. NameBound needs one private team per account to hide the original player nametag before it sends viewer-specific virtual labels.
existingTeamBehaviour controls a conflict with a non-NameBound team:
WARN_AND_OVERRIDE (default) logs a warning and moves the account into its NameBound team. The previous team membership and any mechanics attached to it are lost.
WARN_AND_SKIP logs a warning and leaves the existing team untouched. NameBound then cannot hide the vanilla nametag. The client may show both the virtual character label and the original username, producing a double label and a visible username leak.
Choose deliberately. Servers that depend on scoreboard teams for factions, colors, collision, friendly fire, minigames, or permissions need to test this interaction before deployment.
Features
Exactly one active character per authenticated UUID; there is no player rename or character-switch command.
Persistent global character state shared across dimensions, including character generation history, active-name ownership, surname mode, optional dead-name reservations, and staff preferences.
Forced vanilla GUI flow: first-name anvil, last-name anvil, then a confirmation chest.
Creation lock that blocks normal chat, unrelated commands, block breaking, attacks, and block/entity/item use. It can also provide temporary invulnerability and reopen a closed creation screen.
Unicode-code-point-aware full-name limit: first name + one space + last name is at most 16 code points.
Case-insensitive active-name uniqueness, configurable blacklist, title-case normalization, and optional Unicode/apostrophe/hyphen support.
Global SHORTENED (John S.) and FULL (John Smith) surname display modes, persisted in the world save.
Viewer-specific names in overhead packet-only text displays, the player list, and signed-chat decoration.
Authorized staff can privately choose character names or real usernames without changing any other viewer's display.
Narrow death-message replacement that leaves vanilla death processing intact, followed by character deletion and private server logging.
Administrative inspection, reset, set, reload, label cleanup, and identity lookup commands.
Requirements and installation
NameBound is built for these exact project versions:
Component Requirement
Minecraft Java Edition server 1.21.1
Java 21 or newer
Fabric Loader 0.16.14 or newer
Fabric API Built and tested against 0.116.13+1.21.1
Multiplayer client mod None when joining a dedicated server
To install on a dedicated server:
Install Fabric Loader for a dedicated Minecraft 1.21.1 server.
Put Fabric API 0.116.13+1.21.1 and namebound-1.0.1.jar in the server's mods directory.
Start the server with Java 21. NameBound creates config/namebound.json on its first run.
Stop the server, review the generated configuration—especially existingTeamBehaviour—then restart it.
Back up the world before first use on an existing server. Character state is stored in the overworld's persistent world data.
Clients joining a dedicated NameBound server do not need the mod. To use or test NameBound in singleplayer, however, install both NameBound and Fabric API in that client profile: Minecraft runs singleplayer's integrated server inside the client process, so Fabric must load the jar there. NameBound still contains no client-side feature code, and all user interaction uses vanilla client capabilities.
One-life workflow
A player joins. NameBound looks up the authenticated account UUID in global world state.
If no active character exists, the player enters the creation lock. The player list shows Creating Character…, and the first vanilla anvil screen opens after a short delay.
The player enters a first name, then a last name. Each step validates its input.
A confirmation chest shows the full and public names, plus warnings that the identity cannot be changed and death deletes it. The player may confirm or start again.
Confirmation revalidates the entire name and creates the record atomically on the server thread. Duplicate clicks cannot create a second active record.
Normal gameplay resumes. Viewer-specific character names are sent to chat, the player list, and nearby virtual nametags.
A completed death emits one configured generic message and deletes the active character after vanilla death processing. Totem activations do not count because the player did not complete a death.
Respawn or the next reconnect starts creation again. The account's character generation increments. A dimension transfer does not delete the character.
Incomplete creation sessions are memory-only. Disconnecting during creation causes the flow to start over on the next join.
Name rules
The defaults enforce all of the following:
First and last names are each at least 2 code points.
The complete normalized name, including its separating space, is no more than 16 Unicode code points.
ASCII letters are accepted; Unicode letters are disabled unless configured.
Apostrophes and hyphens are allowed only internally when enabled.
Spaces inside either name part, leading or trailing punctuation, §, control/format characters, newlines, tabs, zero-width characters, and text-component formatting are rejected.
Names are normalized and title-cased (o'connor becomes O'Connor; smith-jones becomes Smith-Jones).
Active full names are unique under normalized, case-insensitive comparison.
Blacklist entries are normalized full names.
/character create <firstName> <lastName> is the fallback when the vanilla GUI is unusable. It only succeeds for a player without an active character.
评论 0
登录后参与评分
还没有评论,来抢沙发吧