I am a student studying Computer Science.
I am actively seeking a PhD position, with a particular interest in programs at UC Berkeley, Stanford, MIT, CMU, and others.
Programming Languages
Softwares & Tools
Frameworks
Others
MCDReforged Plugins
License: GNU General Public License v3.0
请问我应该在哪里启用相关的rcon
服务端的rcon已经开启了
qq执行命令有效果
但是不能返回结果
Windows Server 2019 Datacenter
5700、5701 和 10676 端口均打开,且未被其他应用占用。
Minecraft 服务端占用 3500 端口。
3.8.6rc1 (64-bit)
Minecraft 服务端:
OpenJDK Runtime Environment (Alibaba Dragonwell 8.3.3) (build 1.8.0_242-b98)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell 8.3.3) (build 25.242-b98, mixed mode)
Mirai 机器人:
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)
MiraiOK 版本:MiraiOK 20200915.071520 windows-amd64
Mirai-console 版本:
Starting mirai-console...
2020-09-20 17:47:25 I/main: Backend: version 1.0-M4, built on 2020-09-13 02:19:35.
2020-09-20 17:47:25 I/main: Frontend Pure: version 1.0-M4, provided by Mamoe Technologies
CQHTTP-Mirai 插件信息:
2020-09-20 17:47:27 I/CQHTTP-Mirai: Plugin loaded! 0.2.4-SNAPSHOT-1.0-M4-dev
2020-09-20 17:47:27 I/CQHTTP-Mirai: 插件当前Commit 版本: c2c8ae6
CQHTTP-Mirai 插件配置:
<miraiok安装目录>\config\CQHTTP-Mirai\tech.mihoyo.mirai.Settings.yml
MCDR 版本:0.9.6
MCDR 插件列表:
[MCDR] [19:25:43] [InfoReactor/INFO]: 8x 已加载插件
[MCDR] [19:25:43] [InfoReactor/INFO]: - CoolQAPI-MCDR.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - daycount.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - Here.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - joinMOTD.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - OnlinePlayerAPI.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - QQChat.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - QuickBackupM.py
[MCDR] [19:25:43] [InfoReactor/INFO]: - tps.py
[MCDR] [19:25:43] [InfoReactor/INFO]: 0x 已禁用插件
[MCDR] [19:25:43] [InfoReactor/INFO]: 0x 未加载插件
以上插件在运行过程中均未产生任何报错。
admin_id
中的其中一个管理员 QQ 号。!!MCDR reload all
命令重载 MCDR。/bound
,/whitelist
命令。group_id
的 QQ 群,向机器人发送同样的消息。由于我无法使用随 CoolQAPI 插件分发的 Mirai 包,我使用了其他渠道获取的 MiraiOK 包,
并对照随 CoolQAPI 分发的 CQHTTP-Mirai 配置文件 settings.yml,
修改了我手头 Mirai 包中的 CQHTTP-Mirai 插件配置文件,已经附在上文中。
但我并不能确定是否是我的配置有误导致了机器人与 MCDR 没能共同工作。
希望可以得到您的帮助,非常感谢!
OnlinePlayerAPI.py
加载失败
报错:
[MCDR] [08:08:47] [MainThread/ERROR]: 插件 OnlinePlayerAPI.py 加载失败
Traceback (most recent call last):
File "D:\我的世界服务器研究\MCFab1164\utils\plugin_manager.py", line 63, in load_plugin
plugin.load()
File "D:\我的世界服务器研究\MCFab1164\utils\plugin.py", line 82, in load
self.module = tool.load_source(self.file_path)
File "D:\我的世界服务器研究\MCFab1164\utils\tool.py", line 25, in load_source
spec.loader.exec_module(module)
File "", line 779, in exec_module
File "", line 916, in get_code
File "", line 846, in source_to_code
File "", line 219, in _call_with_frames_removed
File "plugins\OnlinePlayerAPI.py", line 7
^
SyntaxError: invalid syntax
MCDR 版本:0.9.6
Minecraft 服务端核心:Fabric
所有安装的 MCDR 插件:
!!MCDR plugin list
[MCDR] [16:37:35] [InfoReactor/INFO]: 8x 已加载插件
[MCDR] [16:37:35] [InfoReactor/INFO]: - CoolQAPI-MCDR.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - daycount.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - Here.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - joinMOTD.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - OnlinePlayerAPI.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - QuickBackupM.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - tps.py
[MCDR] [16:37:35] [InfoReactor/INFO]: - QQChat.py
[MCDR] [16:37:35] [InfoReactor/INFO]: 0x 已禁用插件
[MCDR] [16:37:35] [InfoReactor/INFO]: 0x 未加载插件
用 MCDR 启动了上述服务端后,控制台反复跳出如下报错:
[MCDR] [16:31:23] [PT2-on_info@QQChat/ERROR]: Error calling on_info in plugin QQChat
Traceback (most recent call last):
File "C:\MARYT-Servers\MCDReforged-0.9.6\utils\plugin_thread.py", line 41, in run
task_data.func(*task_data.args)
File "plugins\QQChat.py", line 263, in on_info
forward_list = get_forward()
File "plugins\QQChat.py", line 306, in get_forward
return json.load(f)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
因为与 MCDR 及其 QQ 相关插件衔接的 QQ 机器人尚未配置完毕,
所以我并不能确定这个报错是否影响到插件的正常功能使用;
但是报错非常频繁,以至于出现了 log spam 的情况,严重干扰到正常的控制台管理。
想问一下这个情况与哪些可能的原因有关?需要我做哪些操作予以解决?
非常感谢。
=2**2**2**2**2**2**2**2**2**2
or !!calc 2**2**2**2**2**2**2**2**2**2
的指令大量执行会阻塞线程!!calc item -1
or !!calc item 3.3
!!calc item []
or !!calc item chr(32)
可以使玩家在某些条件下完成远距离传送
玩家使用!!spec指令后,若重载插件后,玩家再次!!spec会使玩家再一次进入到观察者,并刷新观察上线位置。在此之前移动到想要的位置并输入两次!!spec就可以传送到该位置
在重载插件后保留玩家的旁观、位置数据
!!MCDR plugin load StartStopHelperR.py
[MCDR] [13:16:34] [TaskExecutor/INFO]: 正在从 plugins\StartStopHelperR.py 加载插件
[MCDR] [13:16:34] [TaskExecutor/ERROR]: 插件 RegularPlugin[file=StartStopHelperR.py,path=plugins\StartStopHelperR.py,state=0] 加载失败
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 170, in __load_plugin
plugin.load()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\regular_plugin.py", line 87, in load
self.__load_instance()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\regular_plugin.py", line 67, in __load_instance
self.module_instance = misc_util.load_source(self.file_path)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\utils\misc_util.py", line 31, in load_source
spec.loader.exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "plugins\StartStopHelperR.py", line 4, in
from mcdreforged.plugin.server_interface import PluginServerInterface
ImportError: cannot import name 'PluginServerInterface' from 'mcdreforged.plugin.server_interface' (C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\server_interface.py)
[MCDR] [13:16:34] [TaskExecutor/INFO]: 插件 "StartStopHelperR.py" 加载失败
import json
with open('config.json', encoding='utf-8') as f:
bots = json.load(f)['bots']
for name, bot in bots.items():
# Location
print('!!bot save {} {} {} {}'.format(
name,
' '.join(map(str, bot['pos'])),
' '.join(map(str, bot['rotation'])),
bot['dim']
))
# Comment
if bot['desc'] != 'Nothing here.':
print(f'!!bot config {name} comment {bot["desc"]}')
# Actions
for action in bot['actions']:
print(f'!!bot config {name} actions append {action}')
MCDR v2.3.2
Python v3.9.2
OS: Debian (Linux) 11
[MCDR] [2022-03-23 19:56:06] [TaskExecutor/ERROR]: 插件 SoloPlugin[file=MinedRanking.py,path=plugins/MinedRanking.py,state=PluginState.LOADING] 加载失败
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/mcdreforged/plugin/plugin_manager.py", line 168, in __load_plugin
plugin.load()
File "/usr/local/lib/python3.9/dist-packages/mcdreforged/plugin/type/regular_plugin.py", line 93, in load
self._on_load()
File "/usr/local/lib/python3.9/dist-packages/mcdreforged/plugin/type/solo_plugin.py", line 47, in _on_load
self._load_entry_instance()
File "/usr/local/lib/python3.9/dist-packages/mcdreforged/plugin/type/regular_plugin.py", line 65, in _load_entry_instance
self.entry_module_instance = self._get_module_instance()
File "/usr/local/lib/python3.9/dist-packages/mcdreforged/plugin/type/solo_plugin.py", line 39, in _get_module_instance
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "plugins/MinedRanking.py", line 34, in <module>
class MinedRanking(Thread):
File "plugins/MinedRanking.py", line 35, in MinedRanking
def __init__(self, server: ServerInterface, config):
NameError: name 'ServerInterface' is not defined
在QQChat插件中,其配置文件config.json中默认没有server_name配置项。根据说明,或许是能添加server_name配置项,但是添加之后启动服务器会直接直接重置config.json文件。导致需要重新配置插件。以下是详细信息。
修改config为以下格式:
{
"main_group": [
XXXXXXX
],
"manage_groups": [
],
"message_sync_groups": [
],
"server_name": 'someServerName', //此行 为手动添加项
"admins": [
XXXXXXX
],
......
保存退出并重载服务器(完全重启)后,config.json重置变回默认格式。
抱歉,我不是很懂插件的运作方式,如有勘误请指教。(っ◞‸◟c)
Some details for your issue.
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
MCDR 2.0 support
RT
RT
### http连接时,go-cqhttp后台反复刷屏"上报Event数据到 '反向http post地址' 失败"
抱歉,我遇到上述问题。根据文档的配置,http通信地址对应了'api_host',而反向http post地址对应了'post_host'。配合QQChat插件,qq机器人能一定程度和mc通信(help和绑定白名单指令能正常工作,能从MC发消息到QQ,而QQ不能发消息到MC)。
但是go-cqhttp的控制台一直反复报错:
抱歉,我不是很理解插件和go-cqhttp的工作原理,实在不清楚报错原因。网上案例好像很少,没有找到解决方案。
下面是服务端信息:
go-cqhttp / config.yml :
qq_api / config.json :
{
"api_host": "127.0.0.1",
"api_port": 5700,
"post_host": "127.0.0.1",
"post_port": 5701
}
go-cqhttp控制台警告消息刷屏 :
[WARNING] : 上报 Event 数据到 http://127.0.0.1:5701 失败:Post "http://127.0.0.1:5701": EOF 将进行第 1 次重试
[WARNING] : 上报 Event 数据到 http://127.0.0.1:5701 失败:Post "http://127.0.0.1:5701": EOF 将进行第 1 次重试
....
不久前,我对我的服务器引进了称号系统(用原版的Team实现,格式是 [称号]名称 ),在加上前缀后,我发现Gamemode就不好使了。输入!!spec没反应,啥事没有
后来我了解到这似乎是因为MCDR只会接收玩家“显示的名称”,于是我翻看MCDR帮助文档中服务端处理器部分并成功把其中展示的处理器示例实装到服务器上,但后面还是出了问题,就来这发issue了
实装处理器后的服务端能够接到并处理带有前缀玩家发送的!!MCDR命令、其他插件的命令,但Gamemode插件失效了,实装处理器后使用!!spec时会提示已切换至旁观模式,但就是无法成功切换,仍然停留在生存
搭载服务端的系统:Centos 7.3
Python 3.9.5
Java:
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment 21.3 (build 16.0.1+9)
OpenJDK 64-Bit Server VM 21.3 (build 16.0.1+9, mixed mode, sharing)
游戏版本1.17
加载的所有插件:
[MCDR] [10:49:07] [TaskExecutor/INFO]: 26x 已加载插件
[MCDR] [10:49:07] [TaskExecutor/INFO]: - beep ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - BiliWiki ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - calculator ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - ConfigAPI ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - CoolQAPI ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - daycount ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Daytime ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Gamemode ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Here ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - JsonDataAPI ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Markit ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Task ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - MCDReforged ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Minecraft Data API ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - OnlinePlayerAPI ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - pget_pure ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - QQChat ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Quick Backup Multi ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - seed ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Start Stop Helper ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - stext ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - test ([email protected]) <-这个是我自己写的TPA插件
[MCDR] [10:49:07] [TaskExecutor/INFO]: - Timed QBM ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: - tpa ([email protected])
[MCDR] [10:49:07] [TaskExecutor/INFO]: 0x 已禁用插件
[MCDR] [10:49:07] [TaskExecutor/INFO]: 0x 未加载插件
[Server] [10:39:29] [Server thread/INFO]: <[赞助者]boring_314> !!spec
[Server] [10:39:29] [Server thread/INFO]: [赞助者]boring_314 has the following entity data: "minecraft:overworld"
[MCDR] [10:39:34] [Gamemode switch mode/WARNING]: [Minecraft Data API] Query for player boring_314 at path Dimension timeout
Exception in thread Gamemode switch mode:
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/local/python3/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/root/MCDReforged/plugins/Gamemode.py", line 67, in change_mode
sur_to_spec(server, player)
File "/root/MCDReforged/plugins/Gamemode.py", line 155, in sur_to_spec
dim = DIMENSIONS[api.get_player_info(player, 'Dimension')]
KeyError: None
这是为什么,我该如何解决这个问题?
使用!!bot save 1 时报错,报错内容如下
Error when executing command "!!bot save 1" with command source "Player Doubted2
Traceback (most recent call last):
File "C:\Users\vdyik\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\command\command_manager.pye
node.execute(source, command)
File "C:\Users\vdyik\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\command\builder\nodes\basie
self._execute_command(CommandContext(source, command))
File "C:\Users\vdyik\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\command\builder\nodes\basid
child_literal._execute_command(context)
File "C:\Users\vdyik\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\command\builder\nodes\basid
if not self.__smart_callback(self._requirement, context.source, context):
File "C:\Users\vdyik\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\command\builder\nodes\basik
return callback(*args[:spec_args_len])
File "plugins\Bot-v1.0.2.mcdr\bot\command_handler.py", line 87, in
lambda src: src.has_permission(permissions['save'])
KeyError: 'save'
为方便其他服务通过接口与 MCDR 插件交互,计划发布一个 API 插件,提供 HTTP 的接口能力,其它插件可以注册对外提供的接口。
在某技术大佬的敦促下,决定框架选型 fastapi
现在下方征求该插件命名
Originally posted by @AnzhiZhang in #145 (comment)
A clear and concise description of your issue.
Some details for your issue.
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
希望增加以下提示信息的转发功能:
!!calc item
中,eval()
的执行未经过滤。但由于参数分割及if len(ctx) == 1:
的限制,使得形如!!calc item __import__("os").system("echo Hello!")
含有空格的指令无法被eval()
执行。但仍可通过字符拼接的方式成功执行:!!calc item __import__("os").system("echo+chr(32)+Hello!")
`
Error invoking listener EventListener[[email protected],priority=1000,callback=<function on_load at 0x00000210DE1AAC20>]
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 474, in trigger_listener
listener.execute(listener.plugin.server_interface, *args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcdreforged\plugin\plugin_event.py", line 79, in execute
return self.callback(*args, **kwargs)
File "F:\rb\mcdr\plugins\QQChat.py", line 62, in on_load
from ConfigAPI.py import Config
ModuleNotFoundError: No module named 'ConfigAPI'
As we all know, the python standard json library has been criticized for its inefficient implementation. So since this project provides a convenient Json package, why not use some more efficient and easy-to-use third-party json library by the way. Like ujson, it has the same usage as the standard json library, except that it needs to be installed as a third-party library. This seems to reduce the experience a little bit, but compared to the efficiency improvement it brings, that is worthful.
There is no doubt about the efficiency improvement from these third-party json libraries. There are some evaluations about it:
Benchmark of Python JSON libraries
Benchmark on home page of ujson library
And some of my light experience tells me that ujson is more than an order of magnitude faster than json. So why not use it?
A clear and concise description of your issue.
Some details for your issue.
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
Add any other context about the problem here.
情景:我使用!!spec后因聊天验证被t出服务器,再次进入发现自己模式变成了冒险,我又再次输入!!spec又因同样原因被踢出,可这次进入模式并没有改为生存,还是冒险模式。之后我大退(重启游戏)没有出现聊天框一打字就被t出的情况,但是却发现!!spec对我无效了,我不管怎么使用都无法切换模式
其他人可以正常使用,就我无法正常使用,服务器后台输出如下:
以下是服务器其他玩家正常使用图片及服务器后台输出
最后我还把出现问题的日志也要来了
日志.zip
awa
希望能够加入tps和mstp功能,和更多关于Minecraft 服务器本身的信息,例如server占用内存,在线人数,服务端版本信息和离线在线等
[MCDR] [12:04:46] [TaskExecutor/ERROR]: Error invoking listener EventListener[[email protected],priority=1000,callback=<function on_load at 0x00000217BFE2A790>]
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 589, in trigger_listener
listener.execute(listener.plugin.server_interface, *args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_event.py", line 106, in execute
return self.callback(*args, **kwargs)
File "plugins\QQAPI-v1.1.1.mcdr\qq_api_init_.py", line 41, in on_load
_bot = CQHttp(api_root=f"http://{config.api_host}:{config.api_port}")
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiocqhttp_init.py", line 135, in init
self._server_app = Quart(import_name, **(server_app_kwargs or {}))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\quart\app.py", line 308, in init
self.first_request_lock = self.lock_class()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\locks.py", line 81, in init
self.loop = events.get_event_loop()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'TaskExecutor'.
[MCDR] [12:04:46] [TaskExecutor/INFO] [qq_chat]: 配置文件已加载
[MCDR] [12:04:46] [TaskExecutor/ERROR]: Error invoking listener EventListener[[email protected],priority=1000,callback=<function on_load at 0x00000217C0844550>]
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 589, in trigger_listener
listener.execute(listener.plugin.server_interface, *args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_event.py", line 106, in execute
return self.callback(*args, **kwargs)
File "plugins\QQChat-v1.0.0.mcdr\qq_chat_init.py", line 68, in on_load
final_bot = server.get_plugin_instance('qq_api').get_bot()
File "plugins\QQAPI-v1.1.1.mcdr\qq_api_init.py", line 106, in get_bot
return __bot
NameError: name 'bot' is not defined
[MCDR] [12:05:03] [TaskExecutor/ERROR]: Error invoking listener EventListener[[email protected],priority=1000,callba]
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_managr
listener.execute(listener.plugin.server_interface, *args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\mcdreforged\plugin\plugin_evente
return self.callback(*args, **kwargs)
File "plugins\QQChat-v1.0.0.mcdr\qq_chat_init.py", line 88, in on_server_startup
send_msg_to_all_groups('Server is started up')
File "plugins\QQChat-v1.0.0.mcdr\qq_chat_init.py", line 270, in send_msg_to_all_groups
event_loop.run_until_complete(
NameError: name 'event_loop' is not defined
go-cqhttp也报错
[2023-02-18 12:07:11] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": dial tcp 127.0.0.1:5701: connectex: No connection could be made because the target machine actively refused it. 将进行第 1 次重试
[2023-02-18 12:07:15] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": dial tcp 127.0.0.1:5701: connectex: No connection could be made because the target machine actively refused it. 将进行第 2 次重试
[2023-02-18 12:07:18] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": dial tcp 127.0.0.1:5701: connectex: No connection could be made because the target machine actively refused it. 将进行第 3 次重试
[2023-02-18 12:07:22] [WARNING]: 上报 Event 数据 {"post_type":"meta_event","meta_event_type":"heartbeat","time":1676693229,"self_id":3537494107,"interval":5000,"status":{"app_enabled":true,"app_good":true,"app_initialized":true,"good":true,"online":true,"plugins_good":null,"stat":{"packet_received":25,"packet_sent":16,"packet_lost":0,"message_received":0,"message_sent":0,"disconnect_times":0,"lost_times":0,"last_message_time":0}}}
操作系统:Windows Server 2019 Datacenter
Python 版本:3.8.6-rc1(64bit)
MCDR 版本:0.9.6
Minecraft 服务端核心:Fabric
所有安装的 MCDR 插件:
!!MCDR plugin list
[MCDR] [12:31:52] [InfoReactor/INFO]: 7x 已加载插件
[MCDR] [12:31:52] [InfoReactor/INFO]: - CoolQAPI-MCDR.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - daycount.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - Here.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - joinMOTD.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - OnlinePlayerAPI.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - QuickBackupM.py
[MCDR] [12:31:52] [InfoReactor/INFO]: - tps.py
[MCDR] [12:31:53] [InfoReactor/INFO]: 0x 已禁用插件
[MCDR] [12:31:53] [InfoReactor/INFO]: 1x 未加载插件
[MCDR] [12:31:53] [InfoReactor/INFO]: - QQChat.py
已经安装了 requirements.txt
中包含的所有依赖模块。
安装完成后,服务器启动时,和使用
!!MCDR plugin reloadall
重载插件时,MCDR 抛出如下异常:
https://paste.ubuntu.com/p/RQ493Rz7wZ/
!!whitelist add
!!whitelist remove
!!whitelist list
这样我就可以放弃自己写的垃圾插件了(
最近在用ChatBridge
但是里面的QQ客户端有bug不能用
而且QQChat功能更丰富
我的服务器还是群组服(在代理端装MCDR没有什么用(而且MCDR不支持我用的Velocity代理端))
所以想要能支持ChatBridge
谢谢
改造数据层使其支持数据库,并提供相关文档方便第三方使用
大佬您好,目前发现通过FZ-sDataPack-Plus-Plus数据包创建的假人,只能在创建时添加到在线列表,kill时并不会从列表中移除,导致只要假人创建就会一直存在于列表。(这个数据包为了假人不被计分板统计在创建假人时给假人加了分组和tag,并且显示的名字前面会有“假的 ”前缀。)我读了您的源码判断这有可能是MCDR底层的原因,想向大佬求证一下,或者看看大佬有什么可行的解决方案,谢谢啦
0.9.6
[MCDR] [15:16:13] [InfoReactor/INFO]: 8x 已加载插件
[MCDR] [15:16:13] [InfoReactor/INFO]: - CoolQAPI-MCDR.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - daycount.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - Here.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - joinMOTD.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - OnlinePlayerAPI.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - QQChat.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - QuickBackupM.py
[MCDR] [15:16:13] [InfoReactor/INFO]: - tps.py
[MCDR] [15:16:13] [InfoReactor/INFO]: 0x 已禁用插件
[MCDR] [15:16:13] [InfoReactor/INFO]: 0x 未加载插件
Windows 10 专业工作站版,版本号 20H2
考虑到报错中包含 Proxy,我将“网络和 Internet 设置”中的“手动设置代理”设为“关”,但仍然没有解决问题。
环境变量中有一个http_proxy
,值是127.0.0.1:7890
,应该是代理软件 ClashForWindows 添加的,不确定有没有影响。
[MCDR] [15:10:53] [PT0-on_info@QQChat/ERROR]: Error calling on_info in plugin QQChat
Traceback (most recent call last):
File "C:\MARYT\MARYT Classic\utils\plugin_thread.py", line 41, in run
task_data.func(*task_data.args)
File "plugins\QQChat.py", line 267, in on_info
send_private_msg(info.raw_content, a)
File "plugins\QQChat.py", line 296, in send_private_msg
requests.post(f'http://{host}:{port}/send_private_msg', json=data)
File "C:\Program Files\Python39\lib\site-packages\requests\api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Program Files\Python39\lib\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Program Files\Python39\lib\site-packages\requests\adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "C:\Program Files\Python39\lib\site-packages\requests\adapters.py", line 309, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "C:\Program Files\Python39\lib\site-packages\requests\adapters.py", line 193, in proxy_manager_for
manager = self.proxy_manager[proxy] = proxy_from_url(
File "C:\Program Files\Python39\lib\site-packages\urllib3\poolmanager.py", line 492, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "C:\Program Files\Python39\lib\site-packages\urllib3\poolmanager.py", line 429, in __init__
raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
这个问题是我在将 MCDR 连同服务端一起迁移到另一台机器上时出现的。
Minecraft 服务端可以正常工作,但是 QQChat 频繁产生上述报错,影响到了服务端控制台的正常使用。
我不能确定是因为什么原因产生的,希望能得到你的帮助。
非常感谢你的耐心帮助!
添加假人tag功能,服务器假人过多的时候使用tag便于查找,例如!!bot list , 更进一步的话希望能有个tag菜单的功能,列出所有tag,然后自行选择
In MCDR 2.x, it is impossible to depend on Python .py files other than the file itself same as MCDR 1.x. Therefore, it is strongly recommended to remove these two APIs.
For ConfigAPI, it is possible to use MCDR APIs to get coordinates, which is easy to be changed. For JSONDataAPI, it is possible to use similar methods to some other plugins (e.g. TimedQBM).
The websocket mode is more stable, at least for go-cqhttp. In HTTP mode, inexplicable problems often occur when the settings are correct. This is not a QQAPI problem, but adding ws mode is good for everyone ;)
After you removed QQChat from your repo, I've looked for alternatives for it. However, ChatBridge is to huge for me (both client and server needed) and other plugins that link QQ to the game don't support automatic forwarding (though it isn't difficult to implement).
So is QQChat no longer supported? Or are there any alternatives in development?
对接之后BOT是能用的,但是时不时会出现以下警告
[2023-03-01 00:11:50] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": read tcp 127.0.0.1:64460->127.0.0.1:5701: wsarecv: An existing connection was forcibly closed by the remote host. 将进行第 1 次重试
[2023-03-01 00:12:00] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": read tcp 127.0.0.1:64463->127.0.0.1:5701: wsarecv: An existing connection was forcibly closed by the remote host. 将进行第 1 次重试
[2023-03-01 00:12:50] [WARNING]: 上报 Event 数据到 http://127.0.0.1:5701/ 失败: Post "http://127.0.0.1:5701/": read tcp 127.0.0.1:64469->127.0.0.1:5701: wsarecv: An existing connection was forcibly closed by the remote host. 将进行第 1 次重试
When the format control character appears in the middle of a chat text instead of the beginning of the line, the plug-in will not work properly.
Take the following figure as an example:
Here, the &a in the line should be parsed, but it doesn't actually happen.
The expected result is shown in the figure below:
However, I did it by adding &f at the beginning of the line.
So after a lot of testing, it is found that the entire line will be parsed only when the control character appears at the beginning of the line. This is a functional bug. Read the code and speculate that the match function of the re module may have been misused. This function only provides regular expression matching at the beginning of the string. The search function should be used to achieve in-line matching.
Also see: search-vs-match
To solve this problem, my opinion is as follows:
Change line 28
of the ColoredChat.py
file:
if re.match(r'&[0-9a-z]', info.content):
to
if re.search(r'&[0-9a-z]', info.content):
[coloredChat]: 加载失败,没有 mcdreforged.info
这个模块。(应该是个简单的问题,但是我不懂python所以没法解决)
配置:
centOS8.5 x86_64
python:@3.8.latest
mcdr:@2.3.1
依赖包:
mcdr安装方式:
下载: pip install mcdreforged
初始化: python -m mcdreforged init
ps:我记得旧版本有一个 requirements.txt
记录了四个依赖,该版本按照文档使用了python init
的方式,根目录中没有requirements.txt
文件了,我自己也没有手动安装过之前依赖了,我想这个过程应该已经被init做过了吧。服务器可以启动,其他插件没有问题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.