VertexCore
VertexCore 是一个 仅适用于 Paper 的核心插件,旨在为插件开发者提供共享的基础架构。
它提供了用于配置处理、数据库访问和命令执行的复用基础设施,减少了跨多个插件的重复样板代码。
VertexCore 不是一个游戏性插件。
它被设计为其他插件的依赖项使用。
功能特性
配置系统
- 基于注解的配置定义
- 自动生成和加载配置文件
- 验证、默认值和注释支持
- 配置对象直接映射到 Java 类
数据库系统
- 统一的数据库抽象层
- 支持的后端:
- JSON(平面文件)
- H2
- MySQL / MariaDB
- 异步和同步访问
- 内置迁移支持
- 通过配置驱动数据库设置
命令系统
- 集中的命令执行框架
- 支持根命令和子命令
- 参数注入和解析器
- 权限和可见性处理
- Tab 补全支持
要求与兼容性
VertexCore 1.1.x 构建为 Java 21 字节码,并针对 Paper 1.21.4 API 进行编译。
已验证的运行时兼容性:
| Paper |
Java |
状态 |
| 1.21.4 |
21 |
已验证 |
| 26.2 |
25 |
已验证 |
相同的 VertexCore JAR 文件用于两者的运行时检查。
- VertexCore 所需的最低 Java 版本: Java 21
- 最低支持的 Paper 基线: Paper 1.21.4
- 较新的 Paper 版本可能需要更新的 Java 运行时,这与 VertexCore 无关。例如,已验证的 Paper 26.2 运行时使用 Java 25。
- VertexCore 1.x 保持兼容性导向;公共 API 兼容性在可能的情况下得到保留。
该兼容性矩阵通过 GitHub Actions 使用可重现的运行时冒烟测试在两个受支持的端点上执行。
安装
- 下载最新版本
- 将
VertexCore.jar 放入服务器的 plugins 文件夹中
- 重启服务器
使用 VertexCore 的插件必须将其声明为依赖项。
开发者用法
VertexCore 通过 jitpack.io 分发。
Gradle
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compileOnly("com.github.Tebrox-Development:VertexCore:v1.1.0")
}
Maven
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.Tebrox-Development</groupId>
<artifactId>VertexCore</artifactId>
<version>v1.1.0</version>
<scope>provided</scope>
</dependency>
开发分支
当前的 development 分支目标是 1.1.0-SNAPSHOT。
其构建基线为:
- Java 发布目标:
21
- Paper 编译 API:
1.21.4-R0.1-SNAPSHOT
- 运行时兼容性门控:Paper
1.21.4 / Java 21 以及 Paper 26.2 / Java 25
文档
- 完整文档可在 GitHub Wiki 中找到
- 涵盖配置、数据库、命令系统和迁移
许可证
MIT License
VertexCore
VertexCore is a Paper-only core plugin designed as a shared foundation for plugin developers.
It provides reusable infrastructure for configuration handling, database access and command execution,
reducing duplicated boilerplate across multiple plugins.
VertexCore is not a gameplay plugin.
It is intended to be used as a dependency by other plugins.
Features
Configuration System
- Annotation-based configuration definitions
- Automatic file generation and loading
- Validation, default values and comments
- Config objects mapped directly to Java classes
Database System
- Unified database abstraction
- Supported backends:
- JSON (flatfile)
- H2
- MySQL / MariaDB
- Async and sync access
- Built-in migration support
- Config-driven database settings
Command System
- Centralized command execution framework
- Support for root commands and subcommands
- Argument injection and resolvers
- Permission and visibility handling
- Tab completion support
Requirements & Compatibility
VertexCore 1.1.x is built as Java 21 bytecode and compiled against the Paper 1.21.4 API.
Verified runtime compatibility:
| Paper |
Java |
Status |
| 1.21.4 |
21 |
Verified |
| 26.2 |
25 |
Verified |
The same VertexCore JAR is used for both runtime checks.
- Minimum Java for VertexCore: Java 21
- Minimum supported Paper baseline: Paper 1.21.4
- Newer Paper versions may require a newer Java runtime independently of VertexCore. For example, the verified Paper 26.2 runtime uses Java 25.
- VertexCore 1.x remains compatibility-oriented; public API compatibility is preserved where possible.
The compatibility matrix is exercised by GitHub Actions using reproducible runtime smoke tests on both supported endpoints.
Installation
- Download the latest release
- Place
VertexCore.jar into your server’s plugins folder
- Restart the server
Plugins using VertexCore must declare it as a dependency.
Developer Usage
VertexCore is distributed via jitpack.io.
Gradle
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
compileOnly("com.github.Tebrox-Development:VertexCore:v1.1.0")
}
Maven
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.Tebrox-Development</groupId>
<artifactId>VertexCore</artifactId>
<version>v1.1.0</version>
<scope>provided</scope>
</dependency>
Development Line
The current development branch targets 1.1.0-SNAPSHOT.
Its build baseline is:
- Java release target:
21
- Paper compile API:
1.21.4-R0.1-SNAPSHOT
- Runtime compatibility gates: Paper
1.21.4 / Java 21 and Paper 26.2 / Java 25
Documentation
- Full documentation is available in the GitHub Wiki
- Covers configuration, database, command system and migration
License
MIT License
评论 0
登录后参与评分
还没有评论,来抢沙发吧