summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-06 22:06:40 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-06 22:06:40 +0200
commit9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa (patch)
tree500cd7ff84cbf42e34eb95225e83c3f18c4258c0 /src/Entities/Player.cpp
parentFixed typo! (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadcuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.gz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.bz2
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.lz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.xz
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.tar.zst
cuberite-9cdb9b6262a0d6ffb9f83c20ca3c9483fb245aaa.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 756410989..b0da6965a 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1670,7 +1670,11 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World)
cEnderChestEntity::LoadFromJson(root["enderchestinventory"], m_EnderChestContents);
m_LoadedWorldName = root.get("world", "world").asString();
- a_World = cRoot::Get()->GetWorld(GetLoadedWorldName(), true);
+ a_World = cRoot::Get()->GetWorld(GetLoadedWorldName(), false);
+ if (a_World == NULL)
+ {
+ a_World = cRoot::Get()->GetDefaultWorld();
+ }
m_LastBedPos.x = root.get("SpawnX", a_World->GetSpawnX()).asInt();
m_LastBedPos.y = root.get("SpawnY", a_World->GetSpawnY()).asInt();