OPAC - Essentials
OPAC 的下一代:更佳的命令系统。
OPAC - Essentials 是 Open Parties and Claims 的附加模组,专为 Brassworks SMP 开发。它提供了可配置的简短命令、小队聊天、细粒度的领地权限以及 Xaero's World Map 领地搜索集成。
版本 2.2 或更高版本的 UI 需要 KotlinForForge
旧版发布记录
2.0 之前的所有发布版本均属于该模组的旧世代。这些版本使用旧的 OPAC - Better Commands 名称,仅提供修复后的命令功能。它们不包含可配置的命令名称或当前的权限系统。
功能特性
- 为 OPAC - Essentials 添加的每个命令配置自定义名称
- 常用 OPAC 命令的简短别名
- 无需参数的
/claim 和 /unclaim 命令
- 支持直接私信、切换开关和状态查看的小队聊天
- 通过
/claims permissions 管理领地权限界面
- 在 Xaero's World Map 中直接搜索领地所有者

命令配置
命令名称可在以下文件中修改:
config/opac_essentials-commands.toml
默认配置如下:
[commands]
claims = "claims"
party = "party"
claim = "claim"
unclaim = "unclaim"
party_chat = "pchat"
命令名称只能包含 1-32 个小写字母、数字、下划线或连字符。每个配置的命令必须使用唯一名称,且不得与由其他模组注册的命令冲突。修改配置后需要完全重启服务器。
领地权限
领地所有者可以为单个注册表条目授予例外权限,而无需开放整个领地。
| 目标对象 |
可用操作 |
| 方块 |
交互、破坏和放置 |
| 方块实体 |
交互和破坏 |
| 实体 |
交互和攻击 |
| 投掷物及投射物 |
投掷、使用和投射物命中 |
规则可以应用于所有玩家,也可以应用于一个或多个选定玩家。要管理这些规则,请站在你所拥有的领地或子领地内并运行:
/claims permissions
该界面支持搜索、注册表建议、多重动作和玩家选择、针对每个目标的玩家分配以及批量访问更改。编辑内容在未按下 Save & Done(保存并完成) 前将保持暂存状态。拥有权限等级 2 的服务器管理员也可以管理其所处的领地或子领地。
权限也可以通过命令树进行列出、添加和移除。加载时会自动迁移旧版的分组权限数据。
小队聊天
使用默认命令名称:
/pchat <message>
/pchat toggle
/pchat status
小队消息使用 OPAC 的原生处理机制和格式。OPAC 返回的错误信息将透传显示给玩家。
Xaero's World Map 领地搜索
当安装了 Xaero's World Map 时,地图界面会添加一个搜索按钮。输入玩家姓名可将地图居中于其第一个领地集群。通过“上一个”和“下一个”控件可以在不相连的集群间切换,当前选中的集群将以高可见度轮廓标记。
领地快照和集群计算采用增量异步处理方式,以减少大量领地时的客户端延迟。
需求与兼容性
- Minecraft 1.21.1
- NeoForge 21.1 发布系列中的 21.1.216 或更高版本
- Open Parties and Claims 0.25.8 或更高版本
- Xaero's World Map(用于可选的领地搜索界面)
- 如果是客户端,则必须安装 KotlinForForge
OPAC - Essentials 包含针对 OPAC API v1 和 API v2 的兼容层。这使得使用 API v1 的旧版受支持 OPAC 版本保持兼容,同时允许新的 API v2 版本在不单独构建的情况下正常工作。
在使用权限界面及其网络功能时,客户端和服务器都需要安装此模组。客户端还需要 KotlinForForge。Xaero 的领地搜索本身是一个客户端侧的世界地图集成。
计划中的功能
以下功能正在规划中,且在开发过程中可能会发生变化:
- 全面重构 OPAC 的领地和队伍界面
- 为领地、子领地、小队和权限提供统一的 UI
- 更多的权限目标和操作类型
- 基于小队、等级和组别的权限规则
- 权限导入、导出及高级迁移工具
- 更多用于管理领地/小队相关事务的管理员命令
路线图条目仅为目标,而非承诺。其范围和发布顺序可能会根据测试情况、OPAC API 变更以及社区反馈而调整。
许可协议
本软件依据 Apache License 2.0 授权。您可以根据该许可证的条款使用、修改和重新分发本软件。
致谢
链接
OPAC - Essentials
The next generation of OPAC - Better Commands.
OPAC - Essentials is an addon for Open Parties and Claims, developed for the Brassworks SMP. It adds configurable short commands, party chat, fine-grained claim permissions and a Xaero's World Map Claim Search integration.
The UI on version 2.2 or higher requires KotlinForForge
Legacy Releases
Every release before 2.0 belongs to the legacy generation of the mod. Those releases use the old OPAC - Better Commands name and only provide fixed command features. They do not include configurable command names or the current permission system.
Features
- Configurable names for every command added by OPAC - Essentials
- Short aliases for commonly used OPAC commands
- Argument-free
/claim and /unclaim commands
- Party chat with direct messages, toggle and status commands
- Claim permission interface through
/claims permissions
- Claim owner search directly in Xaero's World Map

Command Configuration
Command names can be changed in:
config/opac_essentials-commands.toml
Default configuration:
[commands]
claims = "claims"
party = "party"
claim = "claim"
unclaim = "unclaim"
party_chat = "pchat"
Command names may contain 1-32 lowercase letters, numbers, underscores or hyphens. Each configured command must use a unique name and must not conflict with a command registered by another mod. A full server restart is required after changing the configuration.
Claim Permissions
Claim owners can grant exceptions for individual registry entries instead of opening an entire claim.
| Target |
Available actions |
| Blocks |
Interact, break and place |
| Block entities |
Interact and break |
| Entities |
Interact and attack |
| Throwable items and projectiles |
Throw, use and projectile impact |
Rules can apply to all players or to one or more selected players. To manage them, stand inside a claim or subclaim you own and run:
/claims permissions
The interface supports search, registry suggestions, multiple actions and players, per-target player assignments and bulk access changes. Edits remain staged until Save & Done is pressed. Server administrators with permission level 2 can also manage the claim or subclaim in which they are standing.
Permissions can also be listed, added and removed through the command tree. Older grouped permission data is migrated automatically when loaded.
Party Chat
Using the default command names:
/pchat <message>
/pchat toggle
/pchat status
Party messages use OPAC's native handling and formatting. Errors returned by OPAC are passed through to the player.
Xaero's World Map Claim Search
When Xaero's World Map is installed, a search button is added to the map interface. Enter a player's name to center the map on their first claim cluster. Previous and next controls cycle through disconnected clusters, while a high-visibility outline marks the current selection.
Claim snapshots and cluster calculations are processed incrementally and asynchronously to reduce client-side lag with large claim counts.
Requirements and Compatibility
- Minecraft 1.21.1
- NeoForge 21.1.216 or newer within the 21.1 release line
- Open Parties and Claims 0.25.8 or newer
- Xaero's World Map for the optional claim search interface
- If on Client, KotlinForForge is required
OPAC - Essentials contains a compatibility layer for both OPAC API v1 and API v2. This keeps older supported OPAC releases using API v1 compatible while allowing newer API v2 releases to work without a separate build.
Both the client and server need the mod when using the permission UI and its network features. The client also needs KotlinForForge. The Xaero claim search itself is a client-side World Map integration.
Planned Features
The following features are planned and may change during development:
- Complete overhaul of the OPAC claim and party interfaces
- A unified UI for claims, subclaims, parties and permissions
- More permission targets and actions
- Party-, rank- and group-based permission rules
- Permission import, export and advanced migration tools
- More admin commands to manage Claim/Party related stuff
Roadmap entries are goals, not guarantees. Their scope and release order may change based on testing, OPAC API changes and community feedback.
License
Licensed under the Apache License 2.0. You may use, modify and redistribute this software under the terms of that license.
Credits
Links
评论 0
登录后参与评分
还没有评论,来抢沙发吧