summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 11:49:20 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-08 11:49:20 +0100
commitbcbfd3348d9f4f6b976c40cf476044131cde9288 (patch)
treed4c04eb8cfa43959d108035f89f0ff74d705a1e0
parentMerge pull request #2962 from LogicParrot/createAndInitialize (diff)
parentAdd DefaultWorld to newly generated INI (diff)
downloadcuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar.gz
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar.bz2
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar.lz
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar.xz
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.tar.zst
cuberite-bcbfd3348d9f4f6b976c40cf476044131cde9288.zip
-rw-r--r--src/Root.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 4ada5c196..11cc4e250 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -349,9 +349,9 @@ void cRoot::LoadGlobalSettings()
void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIniFile)
{
- // First get the default world
if (a_IsNewIniFile)
{
+ a_Settings.AddValue("Worlds", "DefaultWorld", "world");
a_Settings.AddValue("Worlds", "World", "world_nether");
a_Settings.AddValue("Worlds", "World", "world_end");
m_pDefaultWorld = new cWorld("world");
@@ -361,6 +361,7 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIn
return;
}
+ // First get the default world
AString DefaultWorldName = a_Settings.GetValueSet("Worlds", "DefaultWorld", "world");
m_pDefaultWorld = new cWorld(DefaultWorldName.c_str());
m_WorldsByName[ DefaultWorldName ] = m_pDefaultWorld;