Ostrak — 角色扮演服务器的文档与身份系统
Ostrak 是一款面向 RP(角色扮演)服务器的数字文档插件,其内部基于一个文档 引擎 —— 甚至连内置的护照在代码中也不是特例,它和其他文档类型一样,仅由 YAML 描述定义:
id: passport
name: "&ePassport"
icon: BOOK
numbering: "{seq:06}"
identity: true
fields:
- key: given_name
name: "Given name"
type: text
role: given_name
searchable: true
- key: birth_date
name: "Date of birth"
type: date
role: birth_date
在免费版中,此定义直接打包在 jar 文件中——你可以在 config.yml 中关闭个别字段,但无法自行编辑或添加新的文档类型。编辑现有类型并添加新类型(如驾驶证、持枪许可证、医疗卡、学生证等)是 Premium(高级版)功能,详见下方链接。
✨ 功能特性
- 文档展示而非窥探。
/doc inspect 会向附近玩家发送请求——由对方决定是否出示证件或拒绝。拒绝是合理的角色内行为,并非 bug。
- 状态注册表。 完整的签发、吊销、续期和检查历史记录——这是一个事件日志,而不仅仅是一个数据库表。
- 内置护照。 开箱即用的现成文档类型:包含名、姓、性别、出生日期(年龄自动计算)、出生地、国籍、职业、婚姻状况、配偶、照片、联系方式。任何字段均可通过一行配置轻松禁用。
- 首次加入引导向导。 玩家通过聊天界面逐个填写角色数据,配有可点击的“跳过”按钮以及用于受限字段(如性别)的选项选择按钮——杜绝输入错误风险。
- 丰富且统一风格的消息提示。 所有插件文本均通过 MiniMessage 渲染:支持 HEX 颜色、渐变效果,并提供一致的成功/错误/警告/信息配色方案。可在
lang/en_US.yml 中完全自定义,包括你专属的品牌前缀。
- PlaceholderAPI 支持。
%ostrak_age%、%ostrak_<type>_<field>% 等更多占位符——适用于标签页列表、计分板、聊天等场景,并尊重字段可见性规则。
? 要求
|
|
| 服务器端 |
Paper 1.20.1 – 1.21.x |
| Java 版本 |
17 |
| 数据库 |
SQLite(内置,无需额外安装) |
| 依赖项 |
无必需依赖。PlaceholderAPI —— 可选 |
⚙️ 核心命令
| 命令 |
说明 |
/passport |
打开你自己的护照 |
/doc show <player> |
自愿出示某玩家的证件 |
/doc inspect <player> |
请求查看附近玩家的证件 |
/doc issue <type> <player> |
签发文证件(管理员权限) |
/registry search <field> <query> |
搜索文档注册表 |
完整命令与权限列表请查阅 文档。
? 链接
- ? 文档
- ? Premium(开发中):自定义文档类型、按权限控制字段可见性、审批队列制的签发请求、续期功能、注册表历史、基于 PostgreSQL 的 Web 门户
by Benovich
Ostrak — Documents & Identity for Roleplay Servers
Ostrak is a digital documents plugin for RP servers, built around a
document engine internally — even the built-in passport isn't a special
case in the code, it's just a YAML description like any other document
type:
id: passport
name: "&ePassport"
icon: BOOK
numbering: "{seq:06}"
identity: true
fields:
- key: given_name
name: "Given name"
type: text
role: given_name
searchable: true
- key: birth_date
name: "Date of birth"
type: date
role: birth_date
In the free version this definition ships baked into the jar — you can turn
individual fields off in config.yml, but you can't edit or add types
yourself. Editing types and adding new ones (driver's license, firearm
permit, medical card, student ID...) is a Premium feature, see Links below.
✨ Features
- Documents are presented, not peeked at.
/doc inspect sends a request
to the nearby player — they decide whether to show the document or refuse.
Refusing is a legitimate in-character action, not a bug.
- State registry. Full history of issuance, revocation, renewal and
inspection — an event log, not just a database table.
- Built-in passport. A ready-made document type out of the box: given
name, family name, gender, date of birth (age auto-computed), birthplace,
citizenship, occupation, marital status, spouse, photo, contact info. Any
field can be disabled with a single config line.
- First-join onboarding wizard. Players fill in their character's data
one field at a time via chat, with clickable "Skip" buttons and
option-picker buttons for constrained fields (like gender) — no risk of
typos.
- Rich, on-brand messages. Every plugin text runs through MiniMessage:
HEX colors, gradients, a consistent success/error/warning/info palette.
Fully customizable in
lang/en_US.yml, including your own branded prefix.
- PlaceholderAPI support.
%ostrak_age%, %ostrak_<type>_<field>% and
more — for tab lists, scoreboards, chat, respecting field visibility rules.
? Requirements
|
|
| Server |
Paper 1.20.1 – 1.21.x |
| Java |
17 |
| Database |
SQLite (built in, nothing to install) |
| Dependencies |
none required. PlaceholderAPI — optional |
⚙️ Core commands
| Command |
Description |
/passport |
Open your own passport |
/doc show <player> |
Voluntarily present a document |
/doc inspect <player> |
Request documents from a nearby player |
/doc issue <type> <player> |
Issue a document (admin) |
/registry search <field> <query> |
Search the document registry |
Full command and permission list — in the
documentation.
? Links
- ? Documentation
- ? Premium (in development): custom document types, per-field visibility
by permission, approval-queued issuance requests, renewal, registry
history, a PostgreSQL-backed web portal
by Benovich
评论 0
登录后参与评分
还没有评论,来抢沙发吧