XzCore
XzPlugin 套件共用的配置、存储与诊断工具。
XzCore 为依赖它的 XzPlugins 提供通用服务:加载配置、渲染消息、存储数据、调度任务以及检查服务健康状况。当其他插件需要时安装它。游戏玩法特性和经济规则由依赖这些服务的插件自行处理。
XzCore 提供的功能
- 配置与消息: 共享的加载辅助工具和 MiniMessage 格式化支持。
- 存储: 插件专属的 SQLite 数据库及迁移辅助工具。
- 共享服务: 一个注册表,依赖插件可通过 XzCore API 访问其中的服务。
- 物品与菜单: 物品模板、持久化物品数据及库存布局实用工具。
- 任务调度: 将计划工作与所属插件关联起来的辅助工具。
- 服务器诊断: 为管理员提供就绪状态、数据库、已注册服务及整体健康状况信息。
安装步骤
- 查阅你所用依赖插件的文档,确认所需的 XzCore 版本。
- 停止服务器,并备份现有的插件文件、配置文件和数据。
- 将兼容版本的 XzCore JAR 放入服务器的
plugins 文件夹中。确保仅保留一个处于活跃状态的 XzCore JAR。
- 升级时请保留原有的配置和数据文件夹。
- 启动服务器,查看启动日志,然后运行
/xzcore info 和 /xzcore health 命令进行检查。
更新 JAR 文件后需完全重启服务器。玩家无需在客户端安装 XzCore。
要求与兼容性
- Minecraft 服务器: 1.21.11。
- 服务端软件: Paper 或 Purpur。
- Java: 最低版本 21
管理员命令
| 命令 |
用途 |
/xzcore info |
显示版本、就绪状态、数据库后端及服务列表。 |
/xzcore health |
检查核心服务及数据库可用性。 |
/xzcore services |
列出已注册的服务。 |
/xzcore data |
显示存储诊断信息。 |
/xzcore reload |
重新加载受支持的配置和消息。此操作不能替代 JAR 文件的重新启动。 |
/xzcore debug [on|off|toggle|status] |
管理调试日志记录。 |
/xzcore shutdown |
停止整个服务器。仅限可信的管理员使用。 |
开发者指南
将 XzCore 声明为依赖项,并在其启用后通过 XzCore.getApi() 进行访问。使用 core.storage() 获取插件专属的 SQLite 存储及迁移功能。请确保你的插件所构建匹配的 API 版本与已安装的 XzCore 发行版一致。
XzCore
Shared configuration, storage and diagnostics for the XzPlugin suite.
XzCore provides common services used by dependent XzPlugins: loading configuration, rendering messages, storing data, scheduling tasks and checking service health. Install it when another plugin requires it. Gameplay features and economy rules belong to the dependent plugins.
What XzCore provides
- Configuration and messages: shared loading helpers and MiniMessage formatting.
- Storage: plugin-owned SQLite databases and migration helpers.
- Shared services: a registry that dependent plugins can access through the XzCore API.
- Items and menus: item templates, persistent item data and inventory layout utilities.
- Task scheduling: helpers that associate scheduled work with its owning plugin.
- Server diagnostics: readiness, database, registered-service and health information for administrators.
Installation
- Check the required XzCore version in your dependent plugin's documentation.
- Stop the server and back up existing plugin files, configuration and data.
- Place the compatible XzCore JAR in the server's
plugins folder. Keep only one active XzCore JAR.
- Preserve existing configuration and data folders when upgrading.
- Start the server, inspect the startup log, then run
/xzcore info and /xzcore health.
Activate JAR updates with a full server restart. Players do not install XzCore on their clients.
Requirements and compatibility
- Minecraft server: 1.21.11.
- Server software: Paper or Purpur.
- Java: 21 minimum
Administrative commands
| Command |
Purpose |
/xzcore info |
Show version, readiness, database backend and services. |
/xzcore health |
Check core services and database availability. |
/xzcore services |
List registered services. |
/xzcore data |
Show storage diagnostics. |
/xzcore reload |
Reload supported configuration and messages. This does not replace a JAR restart. |
/xzcore debug [on|off|toggle|status] |
Manage debug logging. |
/xzcore shutdown |
Stop the entire server. Reserve this command for trusted administrators. |
For developers
Declare XzCore as a dependency and access XzCore.getApi() after it has enabled. Use core.storage() for plugin-owned SQLite storage and migrations. Match the API version your plugin was built against with the installed XzCore release.
评论 0
登录后参与评分
还没有评论,来抢沙发吧