Matthiesen Core Webhooks
这是 Matthiesen Core 的服务端库模组,提供 Discord 网页钩子(Webhook)功能。它允许其他模组通过 Matthiesen Core 的网页钩子服务向 Discord 频道发送消息。
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));
}
}
依赖
版本兼容性
| Minecraft Version | Matthiesen Core Version | Mod Version |
|---|---|---|
| 1.21.1 | Unsupported | 1.0.0+ |
| 1.21.1 | 1.x.x | 1.2.0+ |
在
v1.2.0之前,此模组是作为 Matthiesen Lib API 的插件构建的,该插件现已弃用。请更新到最新的 Matthiesen Core 和此模组以继续获得支持。
许可证
MIT - 见 LICENSE。
你是这个资源的作者?登录后可认领此资源。
相似资源
Woot Revived
pharuxtan
一个用于收集生物掉落物的多区块模组。
生物科技
355
玉Jade ?
Snownee
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
实用前置
346
Xaero的小地图
thexaero
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
冒险交通
243
物品管理器Just Enough Items (JEI)
mezz
查看物品与配方
前置实用
240
KubeJS
Lat
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
前置实用
239
Applied Energistics 2
shartte
AE2:一款流行的自动化与存储模组
存储科技
217
评论 0
登录后参与评分
还没有评论,来抢沙发吧