-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
只要在代码中使用 getOnlinePlayers() 则报错。
具体报错内容如下
06:21:11.969 ERROR [legacy-script-engine-quickjs] Fail in GetOnlinePlayers!
06:21:11.981 ERROR [legacy-script-engine-quickjs] C++ Exception: std::runtime_error, from <legacy-script-engine-quickjs>:
06:21:11.981 ERROR [legacy-script-engine-quickjs] bad optional_ref access
06:21:11.981 ERROR [legacy-script-engine-quickjs]
06:21:11.981 ERROR [legacy-script-engine-quickjs] In API: McClass::getOnlinePlayers
06:21:11.981 ERROR [legacy-script-engine-quickjs] In Plugin: getOnlinePlayersTest
To Reproduce
新建一个 Javascript 插件,其内容为:
let onlinePlayers = mc.getOnlinePlayers();
然后运行服务端即可复现报错。
Expected behavior
使用 mc.getOnlinePlayers() 时不出现报错,并且可以正常获取所有在线玩家。
Screenshots
No response
Platform
Windows Server 2022 Datacenter
BDS Version
1.20.62.02
LeviLamina Version
0.8.3
LegacyScriptEngine Version
0.3.1
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working