summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2015-06-13 23:09:43 +0200
committerLane Kolbly <lane@rscheme.org>2015-06-13 23:09:43 +0200
commit9d620a20a0d1fa6af8b6af044610563a7af77712 (patch)
tree461376554da0fe04a69022c217e57873f03fce1b /src/Root.cpp
parentMerge pull request #2237 from lkolbly/master (diff)
downloadcuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar.gz
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar.bz2
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar.lz
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar.xz
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.tar.zst
cuberite-9d620a20a0d1fa6af8b6af044610563a7af77712.zip
Diffstat (limited to '')
-rw-r--r--src/Root.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index a84a3db57..f49f67337 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -342,7 +342,7 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings)
-cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName)
+cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName, bool a_InitSpawn)
{
cWorld * World = m_WorldsByName[a_WorldName];
if (World != nullptr)
@@ -353,7 +353,10 @@ cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension
cWorld * NewWorld = new cWorld(a_WorldName.c_str(), a_Dimension, a_OverworldName);
m_WorldsByName[a_WorldName] = NewWorld;
NewWorld->Start();
- NewWorld->InitializeSpawn();
+ if (a_InitSpawn)
+ {
+ NewWorld->InitializeSpawn();
+ }
m_PluginManager->CallHookWorldStarted(*NewWorld);
return NewWorld;
}