Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_XP5CfD30.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Matthiesen Core Webhooks - 墨喵 Minecraft 资源
Matthiesen Core Webhooks 图标

Matthiesen Core Webhooks

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.2.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/matthiesen-core-webhooks
资源信息

Minecraft 版本: 1.21.1

平台: fabric

标签: library utility

资源介绍

Matthiesen Core Webhooks

Matthiesen Core

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 Mod Version
1.21.1 1.x.x

License

MIT - see LICENSE.

下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Smarter Chutes (Create)

价格:0 墨喵币
下载量:0

查看详情
HeadReborn

价格:0 墨喵币
下载量:0

查看详情
survival2hardcore

价格:0 墨喵币
下载量:0

查看详情
Xandll

价格:0 墨喵币
下载量:0

查看详情