登陆 注册 QQ登陆
快捷导航
查看: 3|回复: 0

[模组分享] Quill Notifications (Quill通知)-MOD模组

[复制链接]

5447

主题

24

回帖

7202

积分

龙❁妻

Rank: 8Rank: 8

经验
7202 EP
金粒
1691 粒
绿宝石
20 块
爱心
0 点
发表于 2025-8-10 19:00:07 | 显示全部楼层 |阅读模式 IP:北京
Quill Notifications (Quill通知)Github |相关wiki |源站链接支持: fabric , quilt一个小型库模组,用于以时尚的方式向在线和离线玩家发送通知!

使用

此模组需要[Fabric API](链接)和[SQLib](链接)。

虽然不需要,但建议使用[Adventure API](链接)。

一旦在服务器上安装了该模组,在首次启动后将生成一个配置文件。务必编辑此配置文件并将其指向文件路径或MySQL数据库。

对开发者

入门

要在项目中包含此模组,只需将其添加为依赖项:

gradle

repositories {

    maven { url \"https://api.modrinth.com/maven\" }

    // adventure api不是严格必要的,但很有帮助,可以让您使用组件消息

    maven {

        name = \"sonatype-oss-snapshots1\"

        url = \"https://s01.oss.sonatype.org/content/repositories/snapshots/\"

        mavenContent { snapshotsOnly() }

    }

}

dependencies {

    modImplementation(\"maven.modrinth:quill:1.1.8\")

    // adventure api不是严格必要的,但很有帮助,可以让您使用组件消息

    modImplementation include(\"net.kyori:adventure-platform-fabric:5.11.0-SNAPSHOT\")

}

通用用法

java

Notification notification = NotificationBuilder.Notification(receiverUUID) // 初始化要发送的新通知

    .setMessage(message) // setMessage()接受String、MutableText或Component变量(请注意,通知将仅保存设置的最后一条消息)

    .setStyle(Scribe.INFO) // setStyle()仅适用于String消息

    .setMetadata(jsonData) // 将json数据注入消息中以与事件系统一起使用

    .setSound(SoundEvents.BLOCK_BELL_USE) // 设置接收通知时要播放的声音事件

    .setCommands(commandString, commandString2) // 设置接收通知时要运行的命令

    .setCommandDelay(10, TimeUnit.SECONDS) // 设置通知发送后您的命令将延迟的时间(您还可以仅传递一个数字作为延迟的毫秒数)

    .build();

Pigeon.send(notification); // 将通知发送给玩家

for (Notification message: QuillNotifications.getNotifications(receiverUUID)) { // 获取玩家的所有待处理通知(通知按照从旧到新的顺序排列)

    if (notification.getMessage().toString().equals(\"Test message plz delete\")) message.cancel() // 在将通知发送给玩家之前取消通知

}

事件系统

java

// 事件系统提供一个通知对象,用于在发送通知数据之前修改通知数据

QuillEvents.PRE_SEND_NOTIFICATION.register((notification) -> {

  System.out.println(notification.getPlayerEntity().getName().getString());

  // 返回true允许发送消息,返回false将阻止消息被发送

  // 返回false将阻止消息被发送

  return true;

  // 用元数据或其他变量做一些酷炫的事情,我不知道事件系统是您的海蛎。

});

来自Modrinth所有游戏版本1.16.51.171.17.11.181.18.11.18.21.191.19.11.19.21.19.31.19.41.201.20.11.20.21.20.31.20.41.20.51.20.61.211.21.11.21.21.21.31.21.41.21.5所有类型fabricquiltQuill Notifications 1.2.3Quill-Notifications-1.2.3.jar下载1.2.3#ReleaseQuill-Notifications-1.2.3-javadoc.jar下载1.2.3#ReleaseQuill-Notifications-1.2.3-sources.jar下载1.2.3#ReleaseUpdated to 1.21.5 (it\'s ready for 1.21.8 but adventure api isnt updated)展开版本: 1.2.3支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5类型:FabricQuiltRelease下载次数: 6Quill Notifications 1.2.2Quill-Notifications-1.2.2.jar下载1.2.2#ReleaseQuill-Notifications-1.2.2-javadoc.jar下载1.2.2#ReleaseQuill-Notifications-1.2.2-sources.jar下载1.2.2#ReleaseUpdated to newest SQLib versionsif updating from a previous Quill Versions your database will have to be cleared展开版本: 1.2.2支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21类型:FabricQuiltRelease下载次数: 132Quill Notifications 1.2.1Quill-Notifications-1.2.1.jar下载1.2.1#ReleaseQuill-Notifications-1.2.1-javadoc.jar下载1.2.1#ReleaseQuill-Notifications-1.2.1-sources.jar下载1.2.1#ReleaseFixed message expiry issue展开版本: 1.2.1支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21类型:FabricQuiltRelease下载次数: 68Quill Notifications 1.2Quill-Notifications-1.2.jar下载1.2#ReleaseQuill-Notifications-1.2-javadoc.jar下载1.2#ReleaseQuill-Notifications-1.2-sources.jar下载1.2#Releaseadded ability to have messages expire after a set period of time展开版本: 1.2支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21类型:FabricQuiltRelease下载次数: 99Quill Notifications 1.1.10Quill-Notifications-1.1.10.jar下载1.1.10#ReleaseQuill-Notifications-1.1.10-javadoc.jar下载1.1.10#ReleaseQuill-Notifications-1.1.10-sources.jar下载1.1.10#ReleaseUpdated to 1.21hope no buggies展开版本: 1.1.10支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21类型:FabricQuiltRelease下载次数: 73Quill Notifications 1.1.9Quill-Notifications-1.1.9.jar下载1.1.9#ReleaseQuill-Notifications-1.1.9-javadoc.jar下载1.1.9#ReleaseQuill-Notifications-1.1.9-sources.jar下载1.1.9#ReleaseUpdated to 1.20.6展开版本: 1.1.9支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6类型:FabricQuiltRelease下载次数: 154Quill Notifications 1.1.8Quill-Notifications-1.1.8.jar下载1.1.8#ReleaseQuill-Notifications-1.1.8-javadoc.jar下载1.1.8#ReleaseQuill-Notifications-1.1.8-sources.jar下载1.1.8#ReleaseUpdated to 1.20.4展开版本: 1.1.8支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4类型:FabricQuiltRelease下载次数: 154Quill Notifications 1.1.7Quill-Notifications-1.1.7.jar下载1.1.7#ReleaseQuill-Notifications-1.1.7-javadoc.jar下载1.1.7#ReleaseQuill-Notifications-1.1.7-sources.jar下载1.1.7#Releasefixed cancel method展开版本: 1.1.7支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 87Quill Notifications 1.1.6Quill-Notifications-1.1.6.jar下载1.1.6#ReleaseQuill-Notifications-1.1.6-javadoc.jar下载1.1.6#ReleaseQuill-Notifications-1.1.6-sources.jar下载1.1.6#Releasefixed issues with not properly handling uuid in getNotifications展开版本: 1.1.6支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 88Quill Notifications 1.1.5Quill-Notifications-1.1.5.jar下载1.1.5#ReleaseQuill-Notifications-1.1.5-javadoc.jar下载1.1.5#ReleaseQuill-Notifications-1.1.5-sources.jar下载1.1.5#Releasefixed null pointer from getNotifications when being called on a player with no notifications展开版本: 1.1.5支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 121Quill Notifications 1.1.4Quill-Notifications-1.1.4.jar下载1.1.4#ReleaseQuill-Notifications-1.1.4-javadoc.jar下载1.1.4#ReleaseQuill-Notifications-1.1.4-sources.jar下载1.1.4#Releasefixed issue where notifications where not properly clearing from the databaseadded getNotifications to QuillNotifications to get pending notifications of a playeradded .cancel() method to Notification objects to cancel a notification before it\'s sent展开版本: 1.1.4支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 97Quill Notifications 1.1.3Quill-Notifications-1.1.3.jar下载1.1.3#ReleaseQuill-Notifications-1.1.3-javadoc.jar下载1.1.3#ReleaseQuill-Notifications-1.1.3-sources.jar下载1.1.3#ReleaseChanged join code to handle empty messages properly展开版本: 1.1.3支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 84Quill Notifications 1.1.2Quill-Notifications-1.1.2.jar下载1.1.2#ReleaseQuill-Notifications-1.1.2-javadoc.jar下载1.1.2#ReleaseQuill-Notifications-1.1.2-sources.jar下载1.1.2#Releaseadded .send() to NotificationBuildermade it so commands no longer require \"/\" prefix展开版本: 1.1.2支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 88Quill Notifications 1.1.1Quill-Notifications-1.1.1.jar下载1.1.1#ReleaseQuill-Notifications-1.1.1-javadoc.jar下载1.1.1#ReleaseQuill-Notifications-1.1.1-sources.jar下载1.1.1#Releaseupdated sqlib, Frick You MrNavaStar展开版本: 1.1.1支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 127Quill Notifications 1.1.0Quill-Notifications-1.1.0.jar下载1.1.0#ReleaseQuill-Notifications-1.1.0-javadoc.jar下载1.1.0#ReleaseQuill-Notifications-1.1.0-sources.jar下载1.1.0#ReleaseCreated notification object to give better control over Notification.Updated SQLib to use new joint database.Added command support to allow you to run commands.Added Notify command展开版本: 1.1.0支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 97Quill Notifications 1.0.4Quill-Notifications-1.0.4.jar下载1.0.4#ReleaseMade Event system return message object to allow for editing of the message through the event展开版本: 1.0.4支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 57Quill Notifications 1.0.3Quill-Notifications-1.0.3.jar下载1.0.3#Releasefixed bug where players couldnt join twice due to messages not clearing properly in the database, event system also has the ability to stop messages from being sent展开版本: 1.0.3支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 41Quill Notifications 1.0.2Quill-Notifications-1.0.2.jar下载1.0.2#Releaseimproved event system to allow for changing of message data before sending展开版本: 1.0.2支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 42Quill Notifications 1.0.1Quill-Notifications-1.0.1.jar下载1.0.1#Releaseadded support for adventure API展开版本: 1.0.1支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricQuiltRelease下载次数: 29Quill Notifications 1.0.0Quill-Notifications-1.0.0.jar下载1.0.0#Release展开版本: 1.0.0支持游戏: 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2类型:FabricRelease下载次数: 44全部版本

markdown_parsed

文章类型:收录

layui.use([\'form\'], function(){
var form = layui.form;
});

游客,如果您要查看本帖隐藏内容请回复
Quill Notifications
楼主 2025-8-10 19:00:07 回复 收起回复
小僵尸论坛感谢有你~
回复 论坛版权

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 手机动态码快速登录

本版积分规则



官方

新浪微博 腾讯微博 微信公众号 投稿规则 版权声明 捐助我们

官方QQ①群: 291907844 (点击加群)
官方QQ②群: 421312192
官方QQ③群: 528726532

介绍

我的世界(Minecraft)小僵尸论坛
收录了来自各地的我的世界(MC)爱好者们的各种资源

须知: 切勿滥用举报,任何与举报相关的信息必须属实!

"Minecraft"以及"我的世界"为Mojang Synergies AB的商标 本站与Mojang以及微软公司没有从属关系

QQ|Archiver|手机版|小黑屋|Minecraft(我的世界)小僵尸论坛 |网站地图

GMT+8, 2025-8-28 03:42 , Processed in 0.203353 second(s), 48 queries .

快速回复 返回顶部 返回列表