summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-06-26 15:12:29 +0200
committerworktycho <work.tycho@gmail.com>2015-06-26 15:12:29 +0200
commit0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5 (patch)
tree893ea949a6e73a914945a62a5fed9ff0266c16b9 /src/Root.cpp
parentMerge pull request #2282 from Haxi52/button-fixes (diff)
parentWork on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld. (diff)
downloadcuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar.gz
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar.bz2
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar.lz
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar.xz
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.tar.zst
cuberite-0a7c54261f0da1aa23c942ee6a2cf6fefb4b8ea5.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 5720f5c0d..349e85315 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;
}