diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-03 22:37:35 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-06 09:18:13 +0100 |
commit | 96f9afa2787c1f268d48d45fffb4eef5e18f146e (patch) | |
tree | cac3bc1d5d3febe974d79f992f0f69161062c569 /src/World.cpp | |
parent | Merge pull request #2972 from marvinkopf/PlayerAutoComplete (diff) | |
download | cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar.gz cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar.bz2 cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar.lz cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar.xz cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.tar.zst cuberite-96f9afa2787c1f268d48d45fffb4eef5e18f146e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index 127621069..fa9b7f966 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -512,8 +512,18 @@ void cWorld::Start(void) if (GetDimension() == dimOverworld) { - m_LinkedNetherWorldName = IniFile.GetValueSet("LinkedWorlds", "NetherWorldName", GetName() + "_nether"); - m_LinkedEndWorldName = IniFile.GetValueSet("LinkedWorlds", "EndWorldName", GetName() + "_end"); + AString MyNetherName = GetName() + "_nether"; + AString MyEndName = GetName() + "_end"; + if (cRoot::Get()->GetWorld(MyNetherName) == nullptr) + { + MyNetherName = ""; + } + if (cRoot::Get()->GetWorld(MyEndName) == nullptr) + { + MyEndName = ""; + } + m_LinkedNetherWorldName = IniFile.GetValueSet("LinkedWorlds", "NetherWorldName", MyNetherName); + m_LinkedEndWorldName = IniFile.GetValueSet("LinkedWorlds", "EndWorldName", MyEndName); } else { |