This commit is contained in:
Matthew Toro 2026-04-07 20:07:17 +00:00 committed by GitHub
commit 49ff61e29a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
69 changed files with 2245 additions and 35 deletions

View file

@ -59,6 +59,7 @@
#include "PlayerChunkMap.h"
#include "Common\Telemetry\TelemetryManager.h"
#include "PlayerConnection.h"
#include "AuthScreen.h"
#ifdef _XBOX_ONE
#include "Durango\Network\NetworkPlayerDurango.h"
#endif
@ -648,6 +649,19 @@ bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DW
//motd = settings->getString(L"motd", L"A Minecraft Server");
//motd.replace('<27>', '$');
if (ShouldUseDedicatedServerProperties())
{
wstring am = GetDedicatedServerString(settings, L"auth-mode", L"session");
authMode = (am == L"offline") ? "offline" : "session";
}
else
{
int idx = AuthProfileManager::getSelectedIndex();
const auto &profiles = AuthProfileManager::getProfiles();
authMode = (idx >= 0 && idx < static_cast<int>(profiles.size()) &&
profiles[idx].type != AuthProfile::OFFLINE) ? "session" : "offline";
}
setAnimals(GetDedicatedServerBool(settings, L"spawn-animals", true));
setNpcsEnabled(GetDedicatedServerBool(settings, L"spawn-npcs", true));
setPvpAllowed(app.GetGameHostOption( eGameHostOption_PvP )>0?true:false);