删除和修改
删除新增的handleRequestTryAction事件和handleRequestAction事件 有关附魔接口均改采用命名空间 新增id转命名空间接口 修正获取最大玩家数代码
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
#include "GMLIB/Server/FakeListAPI.h"
|
||||
#include "GMLIB/Server/LevelAPI.h"
|
||||
#include "Global.h"
|
||||
#include "mc/world/ActorUniqueID.h"
|
||||
#include <variant>
|
||||
|
||||
void Export_Legacy_GMLib_ServerAPI() {
|
||||
RemoteCall::exportAs("GMLib_ServerAPI", "setEducationFeatureEnabled", []() -> void {
|
||||
@@ -76,6 +72,9 @@ void Export_Legacy_GMLib_ServerAPI() {
|
||||
return FakeList::removeAllFakeLists();
|
||||
});
|
||||
RemoteCall::exportAs("GMLib_ServerAPI", "getMaxPlayers", []() -> int {
|
||||
return ll::memory::dAccess<int>(ll::service::getServerNetworkHandler().as_ptr(), 200);
|
||||
if (auto level = GMLIB_Level::getInstance()) {
|
||||
return level->getMaxPlayerCount();
|
||||
}
|
||||
return {};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user