Cardboard (SharkMI Fork)
在 Fabric 服务器上运行 Bukkit / Spigot / Paper 插件

中文
个人维护分支。
基于 CardboardPowered/cardboard,由
SharkMI 维护,用于私人服务器的个人用途,并原样发布。它针对 Minecraft 1.21.11,并包含尚未合并到上游的兼容性修复。
更新遵循我自身服务器的需求,尽最大努力进行——不承诺长期维护,不保证特定插件或模组能正常工作,也不承诺追踪上游项目。这是一个业余项目,而非受支持的产品。
Issues & Feedback
- 分支特有 bug 或建议 → 请在此仓库中提交 Issue。
- 一般讨论或提问 → 欢迎加入 Cardboard Discord(上游社区)。
Scope & Expectations
这个分支存在的原因很简单:我在自己的服务器上遇到了问题,而上游尚未修复,于是我自己进行了修复。这里发布的就是这项工作,分享给可能遇到同样问题的人。
- 首先是个人项目。 更改遵循我自己的服务器需求;更广泛的兼容性工作在尽最大努力的基础上进行。
- 不保证兼容性。 给定的插件或模组可能能工作,也可能不能。
- 欢迎反馈。 如果出现问题请提交 Issue——但不要指望快速响应。提供清晰的重现步骤且我能验证的 PR 最有可能被合并。
- 上游项目优先。 有关通用 Cardboard 的问题,请使用 上游项目。
这并非旨在成为“更完整的 Cardboard”。上游项目才是正统;这只是一个恰好公开了的补丁集。
Fork Differences
这是官方 Cardboard 项目的分支,包含以下更改:
- 增强的 mixin 兼容性:用精确的注入方法(
@Inject, @ModifyArg, @Redirect)替换了 @Overwrite 注解,以避免与其他 Fabric 模组发生冲突
- MiniMOTD 兼容性:修复了与 MiniMOTD 模组的服务器状态 ping 冲突
- carpet-tis-addition 兼容性:修复了船物品放置冲突
- Fabric API NPE 修复:解决了因 Fabric API 字段注入时机导致的崩溃
- OWASP 安全扫描:将 OWASP Dependency-Check 集成到构建流水线中
- Mixin 冲突检测工具:内置运行时扫描器,在启动时报告所有已加载模组之间的 mixin 冲突(控制台输出,可选 JSON 报告,可选自动禁用致命冲突)
How compatibility fixes are made
修复针对根本原因,而非症状。当特定插件或模组触发故障时,目标是修复底层机制,使得同类故障不再发生——而不是仅仅消除该错误而让下一个错误潜伏下来。仅覆盖当前情况的修复会在提交记录和发行说明中特别注明,以免被误认为是通用解决方案。
AI-Assisted Development
此分支 大量使用 AI 辅助开发。除了从上游 Cardboard 项目继承的原始代码外,本仓库中的大多数额外代码均由 AI 编写。代码在发布前经过构建检查和冒烟测试,但未经过完全的人工审查。
主要使用的 AI 工具:
每次发布前都会运行构建和基本的冒烟测试。
Overview
Cardboard 是 FabricMC 的 Bukkit/Spigot/Paper API 实现。它允许你在 Fabric 模组化服务器上运行来自 Bukkit 生态系统的插件,使模组和插件能够并行运行。
Features
- 支持 Bukkit/Spigot/Paper 插件
- 广泛的 Bukkit API 覆盖(进行中)
- 支持 NMS (
net.minecraft.server) 并自动重映射
- 兼容 Fabric API
- 运行时映射:intermediary (
class_xxx)
Installation
Prerequisites
| Software |
Version |
| Java |
21+ |
| Fabric Loader |
0.18+ |
| Minecraft |
1.21.11 |
Steps
-
安装 Fabric Server
-
下载 Cardboard
- 从 GitHub Releases 或 Modrinth 获取最新的 jar 文件
-
放入 mods 文件夹
server/
├── mods/
│ ├── cardboard-xxx.jar <-- 放在此处
│ └── fabric-api-xxx.jar <-- Fabric API(必需)
├── eula.txt
└── server.properties
-
启动服务器
- 配置文件将在首次启动时自动生成
- 将插件放入
plugins/ 文件夹中
Usage
Loading Plugins
只需将 .jar 插件文件放入 plugins/ 目录并重启服务器即可。
配置
配置文件位于 config/cardboard/cardboard-config.yml:
# 启用自动冲突解决
auto_conflict_resolution: true
# 强制禁用的 mixins(用于解决冲突)
mixin-force-disable: []
# Mixin 冲突检测(开发者诊断,默认关闭)
runtime_conflict_scan: false
conflict_scan_json_output: false
auto_disable_fatal_conflicts: false
# 调试选项
debug_mode: false
debug_print_event_call: false
debug_print_all_calls: false
debug_player: false
debug_other: false
debug_print_remaputil: false
有关详细的冲突检测配置,请参阅 docs/mixin-conflict-detection/user-guide.md。
命令
Cardboard 提供了 /cardboard 命令(别名 /cb)作为其自身子命令的单一入口点,以及原版 /plugins 和 /version 命令的替代品。
命令输出支持双语(中文 / 英文)——根据玩家的客户端语言环境自动选择,或通过 /cardboard lang <zh|en> 为每位玩家单独设置。
/cardboard (别名 /cb) — 需要权限 cardboard.command.admin:
| 命令 |
描述 |
/cardboard help |
显示此帮助信息 |
/cardboard version |
显示服务器版本信息 |
/cardboard about |
显示 Cardboard 项目信息 |
/cardboard tps |
显示 TPS / MSPT / 内存 / 运行时长 |
/cardboard worlds |
列出所有世界及其玩家数量 |
/cardboard mods |
列出已加载的 Fabric 模组 |
/cardboard plugins [info|enable|disable <name>] |
显示插件信息(可选:查看信息 / 启用 / 禁用) |
/cardboard debug [list|<flag>|all on|off] |
调试标志:列出 / 切换 / 全部开启|关闭 |
/cardboard log <trace|debug|info|warn|error|fatal|all|off> |
在运行时更改根日志级别 |
/cardboard doctor |
一次性健康检查并提供建议 |
/cardboard dump |
将诊断快照(包括线程转储)写入文件 |
/cardboard compat |
列出已知的模组兼容性规则 |
/cardboard reload |
重新加载 Cardboard 配置 |
/cardboard lang <zh|en> |
切换语言:zh | en(仅限自身) |
debug 接受的调试标志:verbose, events, player, other, remap, worldedit
(每个都映射到一个配置键;list 显示当前状态和对应的键)。
/plugins (别名 /pl) — 列出列表需要权限 bukkit.command.plugins;
enable / disable 另外需要 cardboard.command.admin:
| 命令 |
描述 |
/plugins |
列出插件(显示“已启用 N / 总计 M”以及颜色图例:绿色 = 已启用,红色 = 已禁用) |
/plugins info <name> |
显示单个插件的详细信息 |
/plugins enable <name> |
在运行时启用一个插件 |
/plugins disable <name> |
在运行时禁用一个插件 |
/version (别名 ver, about) — 需要权限 bukkit.command.version:
| 命令 |
描述 |
/version |
显示服务器(及 Cardboard)版本 |
/version <plugin name> |
显示插件的版本信息 |
控制台颜色可以通过 cardboard-config.yml 中的 colored-console(默认 true)和
console-color-pattern 进行控制。
构建
要求
- Java 21+
- Gradle(包含包装器,无需额外安装)
构建命令
# Windows
.\gradlew.bat build
# Linux/Mac
./gradlew build
# 跳过测试(更快)
.\gradlew.bat build -x test
构建产物位于 build/libs/。
构建仪表板
每次推送到 main 都会触发 CI 构建 (build.yml),
生成一个以 CI 运行号命名的 jar,例如
CardBoard-Fork-SharkMI-1.21.11-2026.10.1+b82.jar — 其中 +b82 是构建版本号
(bN),这与 Citizens 的 Jenkins 构建编号理念相同。
最新的成功构建 jar 会发布到 ci-build 发行版中,一个小仪表板
显示了构建历史、每日构建计数以及一键下载功能:
- 仪表板:
- 最新 jar: ci-build release
仪表板直接从浏览器读取 GitHub Actions API。它是无需认证的,
因此受限于 GitHub 的公共速率限制(每个 IP 每小时 60 次请求)——如果显示
速率限制错误,请稍等片刻并刷新。
版本支持
此分支仅针对 Minecraft 1.21.11 —— 不支持旧版本或新版本。
| Minecraft Version |
Fabric Version |
Branch |
Status |
| 1.21.11 |
0.18+ |
main |
Active |
Java 21 标志
此分支针对 Minecraft 1.21.11 且需要 Java 21。Java 21 的
模块系统阻止对内部 JDK API 的运行时反射,而某些插件会使用这种反射——例如
Citizens 和类似插件使用的 Libby 依赖注入。类 Paper 启动器默认包含这些标志,但手写
的 start.sh 脚本如果没有它们将会失败。
将以下内容添加到您的服务器启动脚本中:
JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.lang.invoke=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
--add-opens java.base/java.nio=ALL-UNNAMED \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens java.base/java.util.jar=ALL-UNNAMED \
--add-opens java.base/java.util.zip=ALL-UNNAMED \
--add-opens java.base/java.text=ALL-UNNAMED \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.base/sun.security.x509=ALL-UNNAMED \
--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
start.sh 示例:
java $JAVA_OPTS -jar fabric-server-launch.jar nogui
离线依赖目录(插件/库)
plugins/libraries/ 是 Cardboard 的插件外部依赖目录。
Citizens 等插件使用 Libby 通过网络动态下载其运行时依赖项
(adventure、mocha、ph-tree 等)。如果你的服务器无法访问互联网,或者你希望跳过下载过程,请将所需的依赖 jar 包放入 plugins/libraries/ 中。当在插件 jar 包或全局类加载器中找不到类时,Cardboard 的插件类加载器将回退到从该目录加载类,因此无需在线下载。
已知问题
- Mixin 冲突:某些使用
@Overwrite 的 Fabric 模组可能与 Cardboard 发生冲突
- 解决方案:在
cardboard-config.yml 中配置 mixin-force-disable
- NMS 插件:某些深度依赖 NMS 的插件可能无法正常工作
- Cardboard 支持自动 NMS 重映射,但覆盖率并非 100%
- 缺失事件:部分 Bukkit 事件尚未实现
贡献指南
这是一个个人项目,投入的时间有限,因此我们欢迎贡献,但处理速度可能不会很快。
欢迎提交错误报告和拉取请求——请参阅 CONTRIBUTING.md 以获取构建命令、提交规范、Mixin 规则以及 PR 检查清单。
- 报告错误:打开一个 Issue,并附上你的服务器日志(
latest.log)、Cardboard 版本以及复现步骤。
- 提交代码:Fork 仓库,创建分支,使用
Conventional Commits 进行提交,然后打开 PR。
文档
注意:此 Fork 版本的综合文档仍在编写中。以下资源可供参考:
鸣谢
许可证
本项目遵循 GPL-3.0 许可证。详情请参见 LICENSE。
SrgLib 遵循 MIT 许可证。
Cardboard (SharkMI Fork)
Run Bukkit / Spigot / Paper plugins on Fabric servers

中文
A personal maintenance fork.
Based on CardboardPowered/cardboard, kept by
SharkMI for personal use on a private server and published
as-is. It targets Minecraft 1.21.11 and contains compatibility fixes that have not been
merged upstream.
Updates follow my own server's needs and are made on a best-effort basis — no commitment to
long-term maintenance, no guarantee that a specific plugin or mod will work, and no promise to
track upstream. It is a hobby project, not a supported product.
Issues & Feedback
- Fork-specific bugs or suggestions → Please open an Issue in this repository.
- General discussion or questions → Feel free to join the Cardboard Discord (the upstream community).
Scope & Expectations
This fork exists for a plain reason: I hit problems on my own server that upstream had not
fixed yet, so I fixed them. What is published here is that work, shared in case someone else
runs into the same thing.
- Personal project first. Changes follow what my own server needs; broader compatibility
work happens on a best-effort basis.
- Compatibility is not guaranteed. A given plugin or mod may or may not work.
- Feedback is welcome. Open an issue if something breaks — just don't expect fast
turnaround. A PR with a clear reproduction, and something I can verify, has the best chance
of being merged.
- The upstream project comes first. For general Cardboard questions, use the
upstream project.
This is not meant to be "a more complete Cardboard". The upstream project is the real one;
this is a patch set that happens to be public.
Fork Differences
This is a fork of the official Cardboard project with the following changes:
- Enhanced mixin compatibility: Replaced
@Overwrite annotations with precise injection methods (@Inject, @ModifyArg, @Redirect) to avoid conflicts with other Fabric mods
- MiniMOTD compatibility: Fixed server status ping conflicts with MiniMOTD mod
- carpet-tis-addition compatibility: Fixed boat item placement conflicts
- Fabric API NPE fix: Resolved crash caused by Fabric API field injection timing
- OWASP security scanning: Integrated OWASP Dependency-Check into the build pipeline
- Mixin conflict detection tool: Built-in runtime scanner that reports mixin conflicts across all loaded mods at startup (console output, optional JSON report, optional auto-disable for fatal conflicts)
How compatibility fixes are made
Fixes target the root cause, not the symptom. When a specific plugin or mod triggers a failure,
the goal is to fix the underlying mechanism so that the same class of failure no longer occurs —
not to silence that one error and leave the next one waiting. A fix that only covers the case at
hand is noted as such in the commit and release notes, so it is not mistaken for a general
solution.
AI-Assisted Development
This fork is heavily AI-assisted. Except for the original code inherited from
the upstream Cardboard project,
most of the additional code in this repository is written by AI. Code is
build-checked and smoke-tested before release, but is not fully manually reviewed.
Primary AI tools used:
A build and basic smoke tests are run before each release.
Overview
Cardboard is an implementation of the Bukkit/Spigot/Paper API for FabricMC. It allows you to run plugins from the Bukkit ecosystem on a Fabric modded server, so mods and plugins can run side by side.
Features
- Support for Bukkit/Spigot/Paper plugins
- Broad Bukkit API coverage (work in progress)
- NMS (
net.minecraft.server) support with automatic remapping
- Compatible with Fabric API
- Runtime mapping: intermediary (
class_xxx)
Installation
Prerequisites
| Software |
Version |
| Java |
21+ |
| Fabric Loader |
0.18+ |
| Minecraft |
1.21.11 |
Steps
-
Install Fabric Server
-
Download Cardboard
- Get the latest jar from GitHub Releases or Modrinth
-
Place in mods folder
server/
├── mods/
│ ├── cardboard-xxx.jar <-- put here
│ └── fabric-api-xxx.jar <-- Fabric API (required)
├── eula.txt
└── server.properties
-
Start the server
- The config file will be generated automatically on first launch
- Place plugins in the
plugins/ folder
Usage
Loading Plugins
Simply drop .jar plugin files into the plugins/ directory and restart the server.
Configuration
Configuration file is located at config/cardboard/cardboard-config.yml:
# Enable automatic conflict resolution
auto_conflict_resolution: true
# Force-disabled mixins (for resolving conflicts)
mixin-force-disable: []
# Mixin conflict detection (developer diagnostic, off by default)
runtime_conflict_scan: false
conflict_scan_json_output: false
auto_disable_fatal_conflicts: false
# Debug options
debug_mode: false
debug_print_event_call: false
debug_print_all_calls: false
debug_player: false
debug_other: false
debug_print_remaputil: false
For detailed conflict detection configuration, see docs/mixin-conflict-detection/user-guide.md.
Commands
Cardboard provides a /cardboard command (alias /cb) as the single entry point for its
own subcommands, plus replacements for the vanilla /plugins and /version commands.
Command output is bilingual (Chinese / English) — chosen automatically from the player's
client locale, or set per-player with /cardboard lang <zh|en>.
/cardboard (alias /cb) — requires permission cardboard.command.admin:
| Command |
Description |
/cardboard help |
Show this help |
/cardboard version |
Show server version information |
/cardboard about |
Show Cardboard project information |
/cardboard tps |
Show TPS / MSPT / memory / uptime |
/cardboard worlds |
List all worlds and their player counts |
/cardboard mods |
List loaded Fabric mods |
/cardboard plugins [info|enable|disable <name>] |
Show plugins (optionally: info / enable / disable) |
/cardboard debug [list|<flag>|all on|off] |
Debug flags: list / toggle / all on|off |
/cardboard log <trace|debug|info|warn|error|fatal|all|off> |
Change the root log level at runtime |
/cardboard doctor |
One-shot health check with suggestions |
/cardboard dump |
Write a diagnostic snapshot (incl. thread dump) to a file |
/cardboard compat |
List known mod compatibility rules |
/cardboard reload |
Reload the Cardboard config |
/cardboard lang <zh|en> |
Switch language: zh | en (self only) |
Debug flags accepted by debug: verbose, events, player, other, remap, worldedit
(each maps to a config key; list shows the current state and the key).
/plugins (alias /pl) — listing requires permission bukkit.command.plugins;
enable / disable additionally require cardboard.command.admin:
| Command |
Description |
/plugins |
List plugins (shows "enabled N / total M" plus a colour legend: green = enabled, red = disabled) |
/plugins info <name> |
Show details for a single plugin |
/plugins enable <name> |
Enable a plugin at runtime |
/plugins disable <name> |
Disable a plugin at runtime |
/version (aliases ver, about) — requires permission bukkit.command.version:
| Command |
Description |
/version |
Show the server (and Cardboard) version |
/version <plugin name> |
Show version information for a plugin |
Console colours can be controlled with colored-console (default true) and
console-color-pattern in cardboard-config.yml.
Building
Requirements
- Java 21+
- Gradle (wrapper included, no extra installation needed)
Build Commands
# Windows
.\gradlew.bat build
# Linux/Mac
./gradlew build
# Skip tests (faster)
.\gradlew.bat build -x test
Build artifacts are located in build/libs/.
Build Dashboard
Every push to main triggers a CI build (build.yml) that
produces a jar named with the CI run number, e.g.
CardBoard-Fork-SharkMI-1.21.11-2026.10.1+b82.jar — the +b82 is the build number
(bN), the same idea as Citizens' Jenkins build numbers.
The latest successful jar is published to the ci-build release, and a small dashboard
shows build history, per-day build counts, and a one-tap download:
- Dashboard:
- Latest jar: ci-build release
The dashboard reads the GitHub Actions API directly from the browser. It is unauthenticated,
so it is subject to GitHub's public rate limit (60 requests/hour per IP) — if it shows a
rate-limit error, just wait a bit and refresh.
Version Support
This fork targets Minecraft 1.21.11 only — no older or newer versions are supported.
| Minecraft Version |
Fabric Version |
Branch |
Status |
| 1.21.11 |
0.18+ |
main |
Active |
Java 21 Flags
This fork targets Minecraft 1.21.11 and requires Java 21. Java 21's
module system blocks runtime reflection into internal JDK APIs, which is used by
some plugins — e.g. the Libby dependency injection used by Citizens and similar
plugins. Paper-like launchers include these flags by default, but hand-written
start.sh scripts will fail without them.
Add the following to your server startup script:
JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.lang.invoke=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
--add-opens java.base/java.nio=ALL-UNNAMED \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens java.base/java.util.jar=ALL-UNNAMED \
--add-opens java.base/java.util.zip=ALL-UNNAMED \
--add-opens java.base/java.text=ALL-UNNAMED \
--add-opens java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.base/sun.security.x509=ALL-UNNAMED \
--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED"
Example start.sh:
java $JAVA_OPTS -jar fabric-server-launch.jar nogui
Offline Dependency Directory (plugins/libraries)
plugins/libraries/ is Cardboard's external dependency directory for plugins.
Plugins such as Citizens use Libby to download their runtime dependencies
(adventure, mocha, ph-tree, etc.) over the network on the fly. If your server
has no internet access, or you would rather skip the download, drop the
required dependency jars into plugins/libraries/. Cardboard's plugin class
loader will fall back to loading classes from this directory when they are not
found in the plugin jar or the global class loader, so no online download is
needed.
Known Issues
- Mixin Conflicts: Some Fabric mods using
@Overwrite may conflict with Cardboard
- Solution: Configure
mixin-force-disable in cardboard-config.yml
- NMS Plugins: Some plugins deeply dependent on NMS may not work
- Cardboard supports automatic NMS remapping, but coverage is not 100%
- Missing Events: A few Bukkit events are not yet implemented
Contributing
This is a personal project with limited time behind it, so contributions are appreciated but
are not always quick to be handled.
Bug reports and pull requests are welcome — see CONTRIBUTING.md for build
commands, commit conventions, Mixin rules, and the PR checklist.
- Reporting bugs: open an Issue with your server log (
latest.log), the
Cardboard version, and steps to reproduce.
- Submitting code: fork, branch, commit using
Conventional Commits, then open a PR.
Documentation
Note: Comprehensive documentation for this fork is still being written. The following resources are available:
Credits
License
This project is licensed under the GPL-3.0 License. See LICENSE for details.
SrgLib is licensed under MIT.
评论 0
登录后参与评分
还没有评论,来抢沙发吧