Matthiesen Core Webhooks
A Server-side library mod for Matthiesen Lib projects that want to be able to send discord webhooks easily!
介绍
Matthiesen Core Webhooks
This is a server-side library mod for Matthiesen Core that provides Discord webhook functionality. It allows other mods to send messages to Discord channels via the Matthiesen Core webhook service.
import dev.matthiesen.matthiesen_core.common.api.discord.WebhookNotifierInstance;
import dev.matthiesen.matthiesen_core.common.core.MatthiesenCoreCommon;
public class ExampleWebHook {
private WebhookNotifierInstance webhookNotifierInstance;
public ExampleWebHook() {
var webhookNotifierService = MatthiesenCoreCommon.INSTANCE.getWebhookService();
if (!webhookNotifierService.isAvailable()) {
throw new IllegalStateException("Webhook service is not available");
}
webhookNotifierInstance = webhookNotifierService.makeInstance("https://discord.com/api/webhooks/your-webhook-url");
}
public void sendMessage(String message) {
webhookNotifierInstance.sendMessage(builder -> builder.withContent(message));
}
}
Requirements
Version Compatibility
| Minecraft Version | Matthiesen Core Version | Mod Version |
|——————-|————————-|————-|
| 1.21.1 | Unsupported | 1.0.0+ |
| 1.21.1 | 1.x.x | 1.2.0+ |
Before
v1.2.0, this mod was built as an addon for Matthiesen Lib API, which is now deprecated. Please update to the latest version of Matthiesen Core and this mod for continued support.
License
MIT – see LICENSE.
常见问题
Matthiesen Core Webhooks 支持哪些 Minecraft 版本?
Matthiesen Core Webhooks 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。
Matthiesen Core Webhooks 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
Adammatthiesen 的其他作品
查看全部 →
Cobblemon Move Tutor
添加一个用于教学招式的Cobblemon NPC!
Matthiesen Core
一个适用于 NeoForge 和 Fabric 的前置库,帮助开发者基于同一套通用代码开发模组。
Cobblemon Pokestops
此模组为 Cobblemon 添加了灵感来自 Pokémon GO 的宝可补给站。使用补给站可以获得物品,但每次使用后都需要等待一段冷却时间。
Cobblemon Escape Rope
A lightweight Cobblemon add-on that adds an Escape Rope item for returning to the last safe place where you were under open sky.
评论
登录后评论和评分