summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-11 12:39:13 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-11 12:39:13 +0100
commit12bd5082b897b3df20cf84eebda07d3135cdbe43 (patch)
tree7f8ab91a8e8d444aeb01c4f31a6f61cb5b0b18fb /src/Root.cpp
parentMerge pull request #412 from mc-server/fixes (diff)
downloadcuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.gz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.bz2
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.lz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.xz
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.tar.zst
cuberite-12bd5082b897b3df20cf84eebda07d3135cdbe43.zip
Diffstat (limited to '')
-rw-r--r--src/Root.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index c99bf76b7..09f29c985 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -299,12 +299,30 @@ void cRoot::LoadWorlds(cIniFile & IniFile)
+cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName)
+{
+ if (m_WorldsByName[a_WorldName] != NULL)
+ {
+ return NULL;
+ }
+ cWorld* NewWorld = new cWorld(a_WorldName.c_str());
+ m_WorldsByName[a_WorldName] = NewWorld;
+ NewWorld->Start();
+ NewWorld->InitializeSpawn();
+ return NewWorld;
+}
+
+
+
+
+
void cRoot::StartWorlds(void)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr)
{
itr->second->Start();
itr->second->InitializeSpawn();
+ m_PluginManager->CallHookWorldStarted(*itr->second);
}
}