This commit is contained in:
Kae 2024-09-09 20:35:08 +10:00
parent 95b13f670d
commit f59f6be5d3

View File

@ -430,12 +430,12 @@ String ClientCommandProcessor::swap(String const& argumentsString) {
String ClientCommandProcessor::respawnInWorld(String const& argumentsString) { String ClientCommandProcessor::respawnInWorld(String const& argumentsString) {
auto arguments = m_parser.tokenizeToStringList(argumentsString); auto arguments = m_parser.tokenizeToStringList(argumentsString);
auto worldClient = m_universeClient->worldClient();
if (arguments.size() == 0) if (arguments.size() == 0)
return strf("Respawn in this world is currently {}", worldClient->respawnInWorld() ? "true" : "false"); return strf("Respawn in this world is currently {}", worldClient->respawnInWorld() ? "true" : "false");
bool respawnInWorld = Json::parse(arguments.at(0)).toBool(); bool respawnInWorld = Json::parse(arguments.at(0)).toBool();
auto worldClient = m_universeClient->worldClient();
worldClient->setRespawnInWorld(respawnInWorld); worldClient->setRespawnInWorld(respawnInWorld);
return strf("Respawn in this world set to {} (This is client-side!)", respawnInWorld ? "true" : "false"); return strf("Respawn in this world set to {} (This is client-side!)", respawnInWorld ? "true" : "false");
} }