安装
nb plugin install nonebot-plugin-mcqq-server
Bot 配置与服务端配置
- Bot 配置文件
在 nb 项目路径下找到 .env.prod 文件,添加以下内容
# Minecraft Server 消息互通
MCRCON_PASSWORD = "A"
MCRCON_PORT = 25575
MCS_LOG_PATH = "D:/MinecraftServer/logs/latest.log"
# 功能配置
MCS_GROUP_CMD = []
MCS_GROUP_LIST = ["724024810"] # QQ群
MCS_MC_CMD = []
MCS_MC_BROADCAST = '{"all":["724024810"]}'。
配置说明:
MCRCON_PASSWORDrcon 密码MCRCON_PORTrcon 端口MCS_LOG_PATH服务端日志文件路径,精确到日志文件,为空则关闭广播。MCS_GROUP_CMD群转发触发命令,如果为空则将群聊消息全部转发至服务器。MCS_GROUP_LIST转发至服务器的群组列表MCS_MC_CMD服务器广播命令,如果为空则将服务器消息全部转发至群组。MCS_MC_BROADCAST广播分配配置,键是 Bot ID, 值是该 Bot 负责广播的群组列表
特别注意:当 MCS_MC_BROADCAST 的键为 all 时为单 bot 模式,此时插件会用第一个 bot 进行广播。如果键设置为 all 不可以设置其他 bot
- 服务端配置文件
在 MC 服务端文件的 server.properties 中开启 Rcon
# rcon
enable-rcon=true
rcon.password=1 # 设置rcon密码,与mcrcon_password一致。
rcon.port=25575 # 设置rcon端口,与mcrcon_port一致。
使用方法
在群内或游戏中发送信息即可使用。
超级管理员可使用 mcs指令 向服务器发送控制台指令。
例如 mcs指令 weather rain 相当于输入控制台指令 /weather rain
致谢
Metadata
Release files for nonebot-plugin-mcqq-server 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nonebot_plugin_mcqq_server-1.1.4.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_mcqq_server-1.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / nonebot_plugin_mcqq_server-1.1.4.tar.gz
| Download URL | nonebot_plugin_mcqq_server-1.1.4.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b49c16df142a15d2a896bea09b0203006aacb95e210daa029e563c342c79dd3
|
|
BLAKE2b-256 checksum How to use checksums |
028a85ee55591e53847a3a1ecc4e3783269fea9ef8a4d2ede41bdc22386638b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Windows/10
|
Release files / nonebot_plugin_mcqq_server-1.1.4-py3-none-any.whl
| Download URL | nonebot_plugin_mcqq_server-1.1.4-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cade18124fad0c1f8eea5f52df7da050b275adf85e4e64deab524afe9858f866
|
|
BLAKE2b-256 checksum How to use checksums |
a4bbeb0190c27c451e8a9d6903c83769a9d4a89097cd9a2fe34a436ae4233abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Windows/10
|
Security for nonebot-plugin-mcqq-server 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.