MagicUtils
面向 Minecraft 服务器与模组开发的模块化工具包 - 为配置、本地化、命令、日志、占位符、HTTP 客户端和诊断功能提供共享构建块,在 Bukkit/Paper/Folia、BungeeCord、Velocity、Fabric 和 NeoForge 上统一 API。
只需针对 MagicUtils 编写一次插件或模组,即可在所有平台上运行——平台相关的接线(加载器、适配器、映射)由你处理。
它提供的功能
- Commands - 基于声明式注解的命令引擎,支持 Brigadier、参数、发送者类型和权限,各平台表现一致。
- Config - 具有 YAML 和 TOML 后端的类型安全配置系统。
- Localisation - 具有按作用域解析功能的语言/消息系统。
- Logging - 具有流畅构建器和 MiniMessage 风格格式化的结构化日志记录器。
- Placeholders - 占位符引擎(支持与 PlaceholderAPI / MiniPlaceholders 桥接)。
- HTTP client - 轻量级 HTTP 客户端,用于与 Web 服务通信。
- Diagnostics - 通过
/magicutils 命令 (/mu) 暴露的运行时自检套件,让你能在任何服务器上验证共享运行时是否健康。
两种使用方式
1. 作为独立的插件/模组(本页面)
将对应平台的包放入 plugins/ (Bukkit/Bungee/Velocity) 或 mods/ (Fabric/NeoForge)。它将启动共享的 MagicUtils 运行时并注册带有诊断功能的 /magicutils 命令。其他插件/模组可以依赖它,而不是自行嵌入 MagicUtils。
2. 作为库依赖项
添加 Maven 仓库并依赖你需要的模块:
repositories {
maven("https://maven.theroer.dev/releases/")
}
dependencies {
implementation("dev.ua.theroer:magicutils-bukkit:<version>")
implementation("dev.ua.theroer:magicutils-config-yaml:<version>")
}
平台与版本
| Platform |
Loaders |
| Bukkit |
Paper · Purpur · Spigot · Bukkit · Folia |
| Proxy |
Velocity · BungeeCord · Waterfall |
| Fabric |
Fabric · Quilt |
| NeoForge |
NeoForge |
支持的 Minecraft 版本范围从 1.20 到 26.2。每个平台的 jar 在发布前都会在真实服务器上通过诊断套件进行兼容性烟雾测试。
? Docs:
? Maven:
Alpha channel: the API is stabilising toward 1.x. Feedback and issue reports are welcome.
MagicUtils
A modular toolkit for Minecraft server & mod development - shared building blocks for configuration, localisation, commands, logging, placeholders, HTTP clients, and diagnostics, with a single API across Bukkit/Paper/Folia, BungeeCord, Velocity, Fabric, and NeoForge.
Write your plugin or mod once against MagicUtils, and it runs on every platform - the per-platform wiring (loaders, adapters, mappings) is handled for you.
What it gives you
- Commands - a declarative, annotation-based command engine with Brigadier support, arguments, sender types, and permissions, identical on every platform.
- Config - type-safe configuration with YAML and TOML backends.
- Localisation - a language/messages system with per-scope resolution.
- Logging - a structured logger with a fluent builder and MiniMessage-style formatting.
- Placeholders - a placeholder engine (with PlaceholderAPI / MiniPlaceholders bridges).
- HTTP client - a small, dependency-light HTTP client for talking to web services.
- Diagnostics - a runtime self-check suite exposed via the
/magicutils command (/mu), so you can verify the shared runtime is healthy on any server.
Two ways to use it
1. As a standalone plugin/mod (this page)
Drop the bundle for your platform into plugins/ (Bukkit/Bungee/Velocity) or mods/ (Fabric/NeoForge). It boots the shared MagicUtils runtime and registers the /magicutils command with diagnostics. Other plugins/mods can then depend on it instead of shading MagicUtils themselves.
2. As a library dependency
Add the Maven repository and depend on the modules you need:
repositories {
maven("https://maven.theroer.dev/releases/")
}
dependencies {
implementation("dev.ua.theroer:magicutils-bukkit:<version>")
implementation("dev.ua.theroer:magicutils-config-yaml:<version>")
}
Platforms & versions
| Platform |
Loaders |
| Bukkit |
Paper · Purpur · Spigot · Bukkit · Folia |
| Proxy |
Velocity · BungeeCord · Waterfall |
| Fabric |
Fabric · Quilt |
| NeoForge |
NeoForge |
Supported Minecraft versions span 1.20 through 26.2. Each platform's jar is compatibility-smoke-tested on a real server with the diagnostics suite before release.
? Docs:
? Maven:
Alpha channel: the API is stabilising toward 1.x. Feedback and issue reports are welcome.
评论 0
登录后参与评分
还没有评论,来抢沙发吧