采用本地读取 log 信息的方法的 Minecraft Server 消息互通插件。
Project description
安装
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
致谢
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_mcqq_server-1.1.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_mcqq_server-1.1.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eff6ade91b9eae09d9b67936b4680f3682a26fba01c74a24771e69278cc784e4
|
|
| MD5 |
78b592c3bba6ccf8aec89f93e850be6b
|
|
| BLAKE2b-256 |
607ea4694f331a686df8a17a9dce9caf7b362b28fd2e6176b12b97f4525791fc
|
File details
Details for the file nonebot_plugin_mcqq_server-1.1.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_mcqq_server-1.1.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93751b2b24696788cd576356c3e09fc536184b2f1e931a0afe998d6f5c587f93
|
|
| MD5 |
14fc4b37f4568e29d9af7fd353295f34
|
|
| BLAKE2b-256 |
03773ff5f13220f16b8ed66f85b3b48704d895a210fb1fd4195324125a80c8af
|