{"id":15014970,"url":"https://github.com/nova-committee/mcbot","last_synced_at":"2025-04-04T18:09:48.247Z","repository":{"id":38336243,"uuid":"413789364","full_name":"Nova-Committee/McBot","owner":"Nova-Committee","description":"A mod allowed you to connect minecraft and QQ ","archived":false,"fork":false,"pushed_at":"2025-03-16T18:31:26.000Z","size":2388,"stargazers_count":150,"open_issues_count":14,"forks_count":21,"subscribers_count":3,"default_branch":"multi/1.20.1","last_synced_at":"2025-04-04T18:09:42.839Z","etag":null,"topics":["fabric-mod","forge-mod","go-cqhttp","minecraft","minecraft-mod","mirai","multiversion","onebot","qqbot","qqrobot","quilt-mod","rift-mod","shamrock"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nova-Committee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-05T11:28:48.000Z","updated_at":"2025-03-27T15:45:57.000Z","dependencies_parsed_at":"2023-12-16T10:45:57.812Z","dependency_job_id":"9fa8a0d0-bd93-4e04-9f84-35ca867548ec","html_url":"https://github.com/Nova-Committee/McBot","commit_stats":{"total_commits":215,"total_committers":10,"mean_commits":21.5,"dds":0.2558139534883721,"last_synced_commit":"2bbd36efa75c79f29183018f2f93911e3988fbb5"},"previous_names":["nova-committee/mcbot"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nova-Committee%2FMcBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nova-Committee%2FMcBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nova-Committee%2FMcBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nova-Committee%2FMcBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nova-Committee","download_url":"https://codeload.github.com/Nova-Committee/McBot/tar.gz/refs/heads/multi/1.20.1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fabric-mod","forge-mod","go-cqhttp","minecraft","minecraft-mod","mirai","multiversion","onebot","qqbot","qqrobot","quilt-mod","rift-mod","shamrock"],"created_at":"2024-09-24T19:46:20.531Z","updated_at":"2025-04-04T18:09:48.216Z","avatar_url":"https://github.com/Nova-Committee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"300\" src=\"https://s2.loli.net/2022/10/02/zrebhtAKjc3GyIl.png\" alt=\"title\"\u003e  \n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\n# McBot\n\n_✨ 基于 [OneBot](https://github.com/howmanybots/onebot/blob/master/README.md) 协议的 我的世界 QQ机器人✨_\n\n\u003c/div\u003e\n\u003chr\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Nova-Committee/McBot/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/Nova-Committee/McBot?style=flat\" alt=\"issues\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.curseforge.com/minecraft/mc-mods/botconnect\"\u003e\n        \u003cimg src=\"http://cf.way2muchnoise.eu/botconnect.svg\" alt=\"CurseForge Download\"\u003e\n    \u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-GPLV3-green\" alt=\"License\"\u003e\n    \u003ca href=\"https://github.com/howmanybots/onebot\"\u003e\u003cimg src=\"https://img.shields.io/badge/OneBot-v11-blue?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAADAwMHBwceHh4UFBQNDQ0ZGRkoKCgvLy8iIiLWSdWYAAAAAXRSTlMAQObYZgAAAQVJREFUSMftlM0RgjAQhV+0ATYK6i1Xb+iMd0qgBEqgBEuwBOxU2QDKsjvojQPvkJ/ZL5sXkgWrFirK4MibYUdE3OR2nEpuKz1/q8CdNxNQgthZCXYVLjyoDQftaKuniHHWRnPh2GCUetR2/9HsMAXyUT4/3UHwtQT2AggSCGKeSAsFnxBIOuAggdh3AKTL7pDuCyABcMb0aQP7aM4AnAbc/wHwA5D2wDHTTe56gIIOUA/4YYV2e1sg713PXdZJAuncdZMAGkAukU9OAn40O849+0ornPwT93rphWF0mgAbauUrEOthlX8Zu7P5A6kZyKCJy75hhw1Mgr9RAUvX7A3csGqZegEdniCx30c3agAAAABJRU5ErkJggg==\"\u003e\u003c/a\u003e  \n    \u003ca href=\"https://github.com/Nova-Committee/McBot/actions/workflows/fabric.yml\"\u003e\u003cimg src=\"https://github.com/Nova-Committee/McBot/actions/workflows/fabric.yml/badge.svg\"\u003e\u003c/a\u003e  \n\u003c/p\u003e  \n\n\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"README_EN.md\"\u003eEnglish\u003c/a\u003e | \n    \u003ca href=\"https://github.com/Nova-Committee/McBot#%E9%95%BF%E6%9C%9F%E6%94%AF%E6%8C%81%E7%89%88%E6%9C%AC\"\u003e长期支持版本\u003c/a\u003e |\n    \u003ca href=\"https://github.com/Nova-Committee/McBot#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B\"\u003e快速开始\u003c/a\u003e\n\u003c/p\u003e\n\n# 长期支持版本\n\n\u003e Forge 1.16.5/1.18.2/1.19.2/1.20.1/1.21  \n\u003e Fabric 1.16.5/1.18.2/1.19.2/1.20.1/1.21\n\n# 快速开始\n\n### 使用api进行请求\n\n```java\npublic class APIDemo {\n    static {\n        // 事件回调\n        McBotEvents.ON_CHAT.register((player, msgId, msg) -\u003e System.out.printf(\"McBot刚刚转发一条消息。由%s发送了%s (%s)%n\", player.getName().getString(), msg, msgId));\n    }\n\n    /**\n     * 群里发送消息\n     * @param groupId 群号\n     * @param message 消息\n     */\n    public static void doSend(long groupId, String message) throws CommandSyntaxException {\n        Const.sendGroupMsg(groupId, message)\n    }\n\n    /**\n     * 撤回消息\n     * @param message_id 消息ID\n     */\n    public static void recallMessage(int message_id) {\n        JsonObject json = new Gson().fromJson(\n                String.format(\"{'message_id': %s}\", message_id),\n                JsonObject.class);\n        Const.customRequest(ActionType.DELETE_MSG, json);\n    }\n}\n```\n\n### 事件监听示例\n\n```java\npublic class WebSocketServerTest {\n    public static void main(String[] args) throws Exception {\n        public static LinkedBlockingQueue\u003cString\u003e blockingQueue = new LinkedBlockingQueue\u003c\u003e();//使用队列传输数据\n        public static Thread app = new Thread(() -\u003e {\n            service = new ConnectFactory(new BotConfig(), blockingQueue);//创建websocket连接\n            bot = service.ws.createBot();//创建机器人实例\n        }, \"BotServer\");\n        app.start();\n        EventBus bus = new EventBus(blockingQueue);//创建事件分发器\n        GroupMessageListener groupMessageListener = new GroupMessageListener();\n        groupMessageListener.addHandler(\"天气\", new Handler\u003cGroupMessageEvent\u003e() {\n            @Override\n            public void handle(GroupMessageEvent groupMessage) {\n                System.out.println(groupMessage);\n\n            }\n        });\n        bus.addListener(groupMessageListener);//加入监听\n        bus.addListener(new SimpleListener\u003cPrivateMessageEvent\u003e() {//私聊监听\n            @Override\n            public void onMessage(PrivateMessageEvent privateMessage) {\n                System.out.println(privateMessage);\n            }\n        });\n\n    }\n}\n```\n\n# 支持\n\nMcBot 以 [OneBot-v11](https://github.com/howmanybots/onebot/tree/master/v11/specs)\n标准协议进行开发，兼容所有支持正向WebSocket的OneBot协议端\n| 项目地址                                                                              | 核心作者           | 备注                                                                    |\n|-----------------------------------------------------------------------------------|----------------|-----------------------------------------------------------------------|\n| [Overflow](https://github.com/MrXiaoM/Overflow)                                   | MrXiaoM        | 实现 mirai 的无缝迁移                                                        |\n| [Lagrange.Core](https://github.com/LagrangeDev/Lagrange.Core)                     | NepPure        | C#实现 By Konata.Core                                                   |\n| [OpenShamrock](https://github.com/whitechi73/OpenShamrock)                        | whitechi73     | Xposed框架hook实现                                                        |\n| [Gensokyo](https://github.com/Hoshinonyaruko/Gensokyo)                            | Hoshinonyaruko | 基于官方api 轻量 原生跨平台                                                      |\n| [LLOnebot](https://github.com/LLOneBot/LLOneBot)                                  | linyuchen      | 使用[LiteLoaderQQNT](https://github.com/LiteLoaderQQNT/LiteLoaderQQNT)  |\n| [NapCatQQ](https://github.com/NapNeko/NapCatQQ)                                   | MliKiowa | 基于NTQQ的无头Bot框架  |\n| [OneBot-Mirai](https://github.com/cnlimiter/onebot-mirai)                                   | cnlimiter | Mirai的onebot协议实现  |\n\n# Credits\n\n* [OneBot](https://github.com/botuniverse/onebot)\n\n# 开源许可\n\nThis product is licensed under the GNU General Public License version 3. The license is as published by the Free\nSoftware Foundation published at https://www.gnu.org/licenses/gpl-3.0.html.\n\nAlternatively, this product is licensed under the GNU Lesser General Public License version 3 for non-commercial use.\nThe license is as published by the Free Software Foundation published at https://www.gnu.org/licenses/lgpl-3.0.html.\n\nFeel free to contact us if you have any questions about licensing or want to use the library in a commercial closed\nsource product.\n\n# 致谢\n\nThanks to [JetBrains](https://www.jetbrains.com/?from=mcbot) for allocating free open-source licences for IDEs such as [IntelliJ IDEA](https://www.jetbrains.com/idea/?from=mcbot)\n[\u003cimg src=\".github/jetbrains-variant-3.png\" width=\"200\"/\u003e](https://www.jetbrains.com/?from=mcbot)\n\n## 星星（要要）~⭐\n\n[![Stargazers over time](https://starchart.cc/Nova-Committee/McBot.svg)](https://starchart.cc/Nova-Committee/McBot)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnova-committee%2Fmcbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnova-committee%2Fmcbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnova-committee%2Fmcbot/lists"}