summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 3d56cbe2e..0cb2615ef 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
{
@@ -3617,7 +3627,7 @@ void cWorld::TabCompleteUserName(const AString & a_Text, AStringVector & a_Resul
PlayerName = (*itr)->GetCustomName();
}
- AString::size_type Found = PlayerName.find(LastWord); // Try to find last word in playername
+ AString::size_type Found = StrToLower(PlayerName).find(StrToLower(LastWord)); // Try to find last word in playername
if (Found == AString::npos)
{
continue; // No match