{"id":37063690,"url":"https://github.com/leaf2006/nonebot-plugin-mc-whitelist-controller","last_synced_at":"2026-01-14T07:17:15.416Z","repository":{"id":330102255,"uuid":"1120538731","full_name":"leaf2006/nonebot-plugin-mc-whitelist-controller","owner":"leaf2006","description":"这是一个控制管理Minecraft服务器白名单的机器人插件，将mc服务器中的玩家id与QQ号绑定，实现对服务器内所有玩家的追根溯源，支持正版服务器和离线服务器","archived":false,"fork":false,"pushed_at":"2025-12-29T12:04:34.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-01T08:45:14.973Z","etag":null,"topics":["minecraft","nonebot-plugin","nonebot2","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leaf2006.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T12:41:09.000Z","updated_at":"2025-12-29T12:04:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leaf2006/nonebot-plugin-mc-whitelist-controller","commit_stats":null,"previous_names":["leaf2006/nonebot-plugin-mc-whitelist-controller"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leaf2006/nonebot-plugin-mc-whitelist-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaf2006%2Fnonebot-plugin-mc-whitelist-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaf2006%2Fnonebot-plugin-mc-whitelist-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaf2006%2Fnonebot-plugin-mc-whitelist-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaf2006%2Fnonebot-plugin-mc-whitelist-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leaf2006","download_url":"https://codeload.github.com/leaf2006/nonebot-plugin-mc-whitelist-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leaf2006%2Fnonebot-plugin-mc-whitelist-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["minecraft","nonebot-plugin","nonebot2","python"],"created_at":"2026-01-14T07:17:14.898Z","updated_at":"2026-01-14T07:17:15.405Z","avatar_url":"https://github.com/leaf2006.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://v2.nonebot.dev/store\"\u003e\u003cimg src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png\" width=\"180\" height=\"180\" alt=\"NoneBotPluginLogo\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cp\u003e\u003cimg src=\"https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg\" width=\"240\" alt=\"NoneBotPluginText\"\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# nonebot-plugin-mc-whitelist-controller\n\n![GitHub License](https://img.shields.io/github/license/leaf2006/nonebot-plugin-mc-whitelist-controller?style=flat-square)\n![GitHub last commit](https://img.shields.io/github/last-commit/leaf2006/nonebot-plugin-mc-whitelist-controller?style=flat-square)\n![GitHub last commit](https://img.shields.io/github/last-commit/leaf2006/nonebot-plugin-railwaytools?style=flat-square)\n![PyPI - Version](https://img.shields.io/pypi/v/nonebot-plugin-mc-whitelist-controller?style=flat-square)\n\n\n _✨一个控制管理Minecraft服务器白名单的机器人插件✨_\n\n\u003c/div\u003e\n\n \u003c!-- \u003e [!NOTE]\n \u003e 该项目目前还处于开发中，还不属于完全体，还不是很稳定！ --\u003e\n\n\n## 📖 介绍\n\n这是一个控制管理Minecraft服务器白名单的机器人插件，将mc服务器中的玩家id与QQ号绑定，实现对服务器内所有玩家的追根溯源，支持正版服务器和离线服务器。本插件可以在QQ中将玩家id注册入服务器白名单，同时会生成一个包含每个玩家id与其绑定的QQ号信息的json文件，供服务器管理员参看。\n\n**在使用前，请务必仔细阅读README.md中的“使用前配置”与“Bot配置”内容，以免出现问题。让这个Bot达到应有的效果，需要你对你的mc服务器进行一些配置，并且给Bot填写一些必填的首选项。**\n\n## 🔨 依赖\n\n- Python \u003e= 3.9\n\n需要安装以下依赖库：\n\n- httpx \u003e= 0.22.0\n\n- nonebot-plugin-localstore \u003e= 0.7.4\n\n## 💿 安装\n\n\u003cdetails open\u003e\n\u003csummary\u003e使用pip安装\u003c/summary\u003e\n在nonebot2项目插件目录下，打开命令行，输入以下安装命令\n\n    pip install nonebot-plugin-mc-whitelist-controller\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e使用git clone安装\u003c/summary\u003e\n可以将本项目克隆到你已经建立好的Nonebot机器人的目录内，并在project.toml中配置好本插件的安装目录\n    \n    git clone https://github.com/leaf2006/nonebot-plugin-mc-whitelist-controller.git\n\n\u003c/details\u003e\n\n\n## ⚠️使用前配置\n\n**这部分内容很重要，跟Bot配置一样重要！因为在一般情况下，mc服务器的白名单在更新后是不会立刻生效的，在什么都不做的情况下，需要你在服务器中输入`/whitelist reload`指令才会使更改后的白名单生效。这里就需要做一些操作让服务器自动重载白名单**\n\n- **给服务器添加定时/计划任务，定期执行`/whitelist reload`指令（最简单，推荐）**\n\n很多人会选择使用服务器控制面板或租用面板服，大部分的面板或面板服都支持添加定时/计划任务。可以添加一个任务，每900秒（15分钟）执行一次`/whitelist reload`指令，实现定时自动重载白名单的功能。\n\n![server-timer](https://raw.githubusercontent.com/leaf2006/image/master/img/server-timer.png)\n\n- **给服务器添加智能重载白名单mod（最智能，还在试验）**\n\n我同时为该插件编写了一个基于Fabric的mod：\u003ca href=\"https://github.com/leaf2006/minecraft-whitelist-watcher-mod\"\u003eMinecraft Whitelist Watcher\u003c/a\u003e ，这个专为Fabric服务端的mod可以实现实时监视白名单，白名单文件内容发生变动时会自动为服务器重载白名单。但这个mod仍在开发，目前支持的mc版本较少，本人正在尽快更新使其支持更多版本。\n\n\n## ⚙️ Bot配置\n\n在配置之前，我建议您在实装完插件后先`nb run`一下Bot，然后再关掉\n\n本插件使用\u003ca href=\"https://github.com/nonebot/plugin-localstore\"\u003e**nonebot-plugin-localstore**\u003c/a\u003e插件存储配置文件，本插件配置文件名为`config.json`，一般来说，本插件的配置文件会位于：\n\n- Windows:`C:\\Users\\\u003cusername\u003e\\AppData\\Roaming\\nonebot2\\nonebot_plugin_mc_whitelist_controller`\n- Linux:`~/.config/nonebot2/nonebot_plugin_mc_whitelist_controller`\n\n如果还是不清楚在哪里，可以在Bot根目录执行`nb localstore`命令查看。\n\n如果您按照上述步骤，在配置前已经运行过一次Bot了的话，本插件会自动在上述目录里创建`config.json`文件，并已在文件内创建了模板，您可以前往上述目录，打开该文件填写相关配置项了。如果上述目录内没有该文件，您可以手动创建`config.json`文件，**并按照一下要求配置**：\n\n| 配置项 | 必填 | 默认值 | 说明 |\n|:-----:|:----:|:----:|:----:|\n| whitelist_path | 是 | 无 | 服务器whitelist.json的绝对路径 |\n| profile_path | 否 | 无 | 存放玩家id和QQ号的文件的绝对路径（若不存在该文件会自动创建），如果未填该配置会自动依据localstore在默认的目录内创建一个profile.json |\n| server_status | 否 | offile | 填写服务器状态（正版/离线服务器）：online/offline |\n| administrator_id | 否 | [ ] | 本插件管理员账户QQ号，可以查看玩家信息，可设置多个管理员 |\n\n- 配置文件json模板\n\n```json\n// config.json\n\n{\n\t\"whitelist_path\": \"\",\n\t\"profile_path\": \"profile.json\",\n\t\"server_status\": \"offline\",\n\t\"administrator_id\": []\n}\n```\n\n- whitelist_path配置示例：\n```json\n// config.json\n// 本示例中给出的地址为虚构地址，仅供演示\n\"whitelist_path\": \"C:\\\\Users\\\\Minecraft\\\\whitelist.json\"\n```\n\n\u003e[!IMPORTANT]\n\u003e填写该配置项，以及下面的profile_path配置项时，请务必不要使用`\\`分隔，改用``\\\\``或`/`，防止出错\n\n- profile_path配置示例：\n```json\n// config.json\n// 本示例中给出的地址为虚构地址，仅供演示\n\"PROFILE_PATH\": \"C:\\\\Users\\\\Minecraft\\\\profile.json\"\n```\n此处profile_path可以是绝对路径内的任意路径，但是在路径最后必须包括文件名，即使这个文件还未被创建。在本插件如果不配置该配置项，则会根据localstore在以下位置默认创建一个profile.json：\n\nWindows:`C:\\Users\\\u003cusername\u003e\\AppData\\Local\\nonebot2\\nonebot_plugin_mc_whitelist_controller`\n\nLinux:`~/.local/share/nonebot2/nonebot_plugin_mc_whitelist_controller`\n\n- administrator_id配置实例：\n```json\n// config.json\n// 本示例中给出QQ号为虚构QQ号，仅供演示\n\"administrator_id\": [1111111111,2222222222]\n```\n\n## 🎉 使用\n### 指令表\n| 指令 | 权限 | 需要@ | 范围 | 说明 |\n|:-----:|:----:|:----:|:----:|:----:|\n| /注册 或 /register + [玩家id] | 群员 | 否 | 群聊 | 向服务器白名单注册玩家信息 |\n| /注销 或 /unregister + [玩家id] | 群员 | 否| 群聊 | 注销已注册的玩家信息 |\n| /指令列表 | 群员 | 否 | 群聊 | 查看指令列表 |\n| /玩家列表 | 注册管理员 | 是 | 私聊或群聊@ | 查看玩家信息，仅已在配置文件中注册过的管理员可用 |\n\n\n\u003e[!IMPORTANT]\n\u003e在首次使用本插件前，或切换过server_status参数后，请务必手动清除whitelist.json中除\"[]\"号外的所有内容，防止出现错误\n\n### 效果\n\n场景：当你向机器人注册玩家id：\n\n```\nexample:\n🤵：/注册 leaf2006\n🤖：成功注册玩家leaf2006到白名单！\n```\n\n此时whitelist.json会自动添加以下语句：\n```json\n[\n    // whitelist.json\n    ...\n    {\n        \"uuid\": \"dbc89c79-8236-36b0-b2cf-7dd0b9989b27\",\n        \"name\": \"leaf2006\"\n    }\n]\n```\n\n此时profile.json会自动添加以下语句，包括注册者的玩家id与QQ号：\n```json\n[\n    ...\n    // nonebot_plugin_mc_whitelist_controller/data/profile.json\n    {\n        \"name\": \"leaf2006\",\n        \"qq\": \"此处代表该人的QQ号\"\n    }\n]\n```\n\n随后，在该白名单之外的玩家便无法进入服务器了，您也可以实现对服务器内所有玩家的追根溯源\n\n*注：以上示例为离线服务器场景*\n\n## 旧版版本\n\n下载或使用旧版版本请前往\u003ca href=\"https://pypi.org/project/nonebot-plugin-mc-whitelist-controller/#history\"\u003ePypi\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nCopyright © Leaf developer 2023-2026，遵循MIT开源协议\n\n\u003c/div\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaf2006%2Fnonebot-plugin-mc-whitelist-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleaf2006%2Fnonebot-plugin-mc-whitelist-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaf2006%2Fnonebot-plugin-mc-whitelist-controller/lists"}