LiteLDev / LeviLamina

A lightweight, modular and versatile mod loader for Minecraft Bedrock Edition, formerly known as LiteLoaderBDS
https://levimc.org/software/levilamina
GNU Lesser General Public License v3.0
1.14k stars 117 forks source link

无法捕获控制台输出ConsoleOutputEvent事件 #1337

Closed XingShuyu closed 1 year ago

XingShuyu commented 1 year ago

异常模块

LiteLoader (本体)

操作系统

Windows 11

LiteLoader 版本

2.15.0+50eb265

BDS 版本

1.20.0.

发生了什么?

无法捕获控制台输出事件,控制台输出后无法触发event

复现此问题的步骤

    Event::ConsoleOutputEvent::subscribe([](const Event::ConsoleOutputEvent& ev)
        {

            cmdMsg = ev.mOutput;

    thread SendCommand(ConsoleEvent);
    SendCommand.detach();
            /*if (BlackMsg.find(cmdMsg) == BlackMsg.npos)
            {
                string outPut = serverName + ": " + ev.mOutput;
                msgSend.groupMsg(GROUPID, outPut);
            }*/
            return true;
        });

有关的日志/输出

插件列表

20:38:42 INFO [Server] 插件列表 [4]
20:38:42 INFO [Server] - CustomMapX [v1.1.4] (CustomMapX.dll)
20:38:42 INFO [Server]   A Custom Map Plugins
20:38:42 INFO [Server] - spc [v0.1.0] (spc.dll)
20:38:42 INFO [Server]   Prints "Hello, World!" in the console.
20:38:42 INFO [Server] - X-Robot [v1.1.3] (X-Robot.dll)
20:38:42 INFO [Server]   A Lite QQRobot For LiteLoader
20:38:42 INFO [Server] - PermissionAPI [v2.9.0] (PermissionAPI.dll)
20:38:42 INFO [Server]   Builtin & Powerful permission API for LiteLoaderBDS
20:38:42 INFO [Server]
20:38:42 INFO [Server]
20:38:42 INFO [Server] * 使用命令“ll list <Plugin Name>”来获取更多信息
XingShuyu commented 1 year ago

换用了1.20.11,ll2.15.0问题仍然存在