diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-08 11:06:14 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-08 11:17:10 +0100 |
commit | 3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56 (patch) | |
tree | 398522505d124f696735b07c82701b0829110158 /src/Root.cpp | |
parent | Merge pull request #2961 from LogicParrot/enforce (diff) | |
download | cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar.gz cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar.bz2 cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar.lz cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar.xz cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.tar.zst cuberite-3efdfca61d2fbfb8e5cb5fb1f5b30ca27fe1cf56.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Root.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index 1a39b09a5..4ada5c196 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -510,29 +510,6 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings, bool a_IsNewIn -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) - { - return World; - } - - cWorld * NewWorld = new cWorld(a_WorldName.c_str(), a_Dimension, a_OverworldName); - m_WorldsByName[a_WorldName] = NewWorld; - NewWorld->Start(); - if (a_InitSpawn) - { - NewWorld->InitializeSpawn(); - } - m_PluginManager->CallHookWorldStarted(*NewWorld); - return NewWorld; -} - - - - - void cRoot::StartWorlds(void) { for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr) @@ -582,7 +559,7 @@ cWorld * cRoot::GetDefaultWorld() -cWorld * cRoot::GetWorld(const AString & a_WorldName, bool a_SearchForFolder) +cWorld * cRoot::GetWorld(const AString & a_WorldName) { WorldMap::iterator itr = m_WorldsByName.find(a_WorldName); if (itr != m_WorldsByName.end()) @@ -590,10 +567,6 @@ cWorld * cRoot::GetWorld(const AString & a_WorldName, bool a_SearchForFolder) return itr->second; } - if (a_SearchForFolder && cFile::IsFolder(FILE_IO_PREFIX + a_WorldName)) - { - return CreateAndInitializeWorld(a_WorldName); - } return nullptr; } |