CourierAPI
CourierAPI is a Fabric mod library that lets any mod send animated HUD notification cards to players — via the Java API, JSON files, or in-game commands. Supports server-to-client broadcasting and client-side local display.
截图
介绍

CourierAPI is a Fabric mod library that lets any mod send animated HUD notification cards to players — via the Java API, JSON files, or in-game commands. Supports server-to-client broadcasting and client-side local display.
Features
- Animated slide-in / slide-out cards in the top-right corner of the HUD
- Fully customizable colors — title, description, background, and border accent (ARGB)
- Configurable display duration per notification
- Up to 4 notifications visible at once; extras queue automatically
- Description wraps to a second line when text is too long
- Server → Client — send notifications via Java API or JSON files, no coding required
- Client-only — display notifications locally from another client mod without a server
- Drop-in
/couriercommand for operators - Auto-creates a sample
couriernotifications.jsonon first server start
For Developers
Add to your gradle.properties:
courierapi_version=0.1
Then in build.gradle:
repositories {
maven {
name = "LunazStudios"
url = "https://maven.lunazstudios.com/releases"
}
}
dependencies {
modImplementation "com.lunazstudios:CourierAPI:${project.minecraft_version}-${project.courierapi_version}"
}
Full documentation and API usage examples are available on the GitHub repository.
Server API
Notification n = Notification.builder("Event Started!", "Head to the arena.")
.durationSeconds(6)
.borderColor(0xFFFF4444)
.build();
CourierAPI.send(player, n); // single player
CourierAPI.broadcast(server, n); // all online players
Client API
// Client-side only — do not call on a dedicated server
CourierClientAPI.showLocal(n);
JSON — No Coding Required
Place couriernotifications.json in your server root to define reusable notifications:
{
"restart_warning": {
"title": "Server Restart",
"description": "The server restarts in 5 minutes.",
"duration": 8,
"border_color": "#FF5555"
}
}
Trigger them in-game with /courier send restart_warning, or drop entries into
couriernotifications_queue.json to dispatch from external scripts or RCON — no restart needed.
Commands
| Command | Description |
|—|—|
| /courier send <id> | Broadcast a notification to all online players |
| /courier reload | Reload couriernotifications.json from disk |
Requires permission level 2 (operator).
常见问题
CourierAPI 支持哪些 Minecraft 版本?
CourierAPI 支持 Minecraft Java 版 1.21.11–26.1.2,共 4 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
CourierAPI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。
LunazStudios 的其他作品
查看全部 →CobbleFurnies
CobbleFurnies 为你的创作注入生命力,带来精美制作、受 Cobblemon 启发的家具,完美融入你的 Minecraft 世界!
Inspectability
一款允许玩家在游戏内查看物品模型的模组,可更近距离、更细致地观察物品外观。
Furnies
Furnies 为 Minecraft 增添时尚实用的家具,让室内外装饰更具特色。
Furnies
Furnies 为 Minecraft 添加了时尚实用的家具,让室内外设计更添魅力。
评论
登录后评论和评分