staffprofiles
有关最新的文档,请参阅 GitHub 上的项目。
staffprofiles 是一个 Minecraft 插件,当玩家使用特定主机名加入服务器时,会为其分配不同的游戏个人资料。
它是我之前的概念验证插件 hostprofiles 的进化版,旨在为人员管理提供一个更实用、更专业的解决方案。
非技术性示例
该插件在玩家登录时主要执行以下操作:
- 检查玩家用于连接的地址是否与配置的人员地址匹配
- 如果地址匹配,则验证该玩家是否具有配置好的权限
- 如果两者都满足条件,则会更改玩家的 UUID 和用户名,导致服务器将该玩家视为拥有独立 Minecraft 账户
示例:
如果你的服务器地址是 example.org,你可以将 staff.example.org(主机)配置为人员主机,这样所有使用该主机连接的玩家,只要拥有 staffprofile 权限,就会被服务器视为使用独立账户连接。
配置
该插件使用 JSON 文件进行配置,而不是 YAML 文件,以减少插件 jar 包的大小。不幸的是,这意味着插件配置文件不能包含任何注释。
请参考以下内容以了解可用的配置选项:
hostRegex: 一个正则表达式模式,用于通过匹配整个地址来确定主机名是否应被视为人员主机
permission: 玩家必须拥有的权限,才允许使用人员主机名加入
uuidTransformer: 指定使用正则表达式模式将玩家 UUID 转换为人物资料 UUID 的方式。格式为 "pattern/replacement",其中 pattern 匹配原始 UUID 的部分内容,replacement 定义如何构建新的 UUID。
usernameTransformer: 指定使用正则表达式模式将玩家用户名转换为人物资料用户名的方式。格式为 "pattern/replacement",其中 pattern 匹配原始用户名的部分内容,replacement 定义如何构建新的用户名。
staffprofiles
Please see the project on GitHub for the most up-to-date documentation.
staffprofiles is a Minecraft plugin that assigns staff members a different game profile if
they are joining using a specific hostname.
It's an evolution of my proof-of-concept plugin hostprofiles
into a more practical, specialized solution for staff management.
Non-technical example
The plugin essentially does the following when a player is logging in:
- It checks if the address that the player is using to connect matches a configured staff address
- If the address matches, it verifies that the player has a configured permission
- If both are true, the player UUID and username are changed, causing the server to treat the player as if
they were on a separate Minecraft account.
An example:
If your server address is example.org, you could configure staff.example.org (the host) as a staff host
so that all players connecting using that host, if they have the permission staffprofile, are
connected using what is treated by the server like a separate account.
Configuration
The plugin is configured using a JSON file as opposed to a YAML file to reduce plugin jar size. Unfortunately, this
means that the plugin configuration file cannot contain any comments.
Please see the reference below to learn about available configuration options:
hostRegex: A regular expression pattern that determines if a hostname should be treated as a staff hostname by matching
against the entire address
permission: The permission the player must have to be allowed to join using a staff hostname
uuidTransformer: Specifies the transformation of player UUIDs into staff profile UUIDs using a regex pattern. The format
is "pattern/replacement" where a pattern matches parts of the original UUID and replacement defines how to construct the
new UUID.
usernameTransformer: Specifies the transformation of player username into staff profile username using a regex pattern.
The format is "pattern/replacement" where a pattern matches parts of the original username and replacement defines
how to construct the new username.
评论 0
登录后参与评分
还没有评论,来抢沙发吧