diff options
author | Mattes D <github@xoft.cz> | 2014-07-29 17:48:56 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-29 17:48:56 +0200 |
commit | 30e64ed4d82c9ef9ac0797a443d07c3f62649b54 (patch) | |
tree | 32ff101a034c0af7d8b4067744b367fcc08e5751 /src/Root.h | |
parent | Merge pull request #1254 from mc-server/SingleTopBlockFinisher (diff) | |
parent | Detrailed whitespace (diff) | |
download | cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.gz cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.bz2 cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.lz cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.xz cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.tar.zst cuberite-30e64ed4d82c9ef9ac0797a443d07c3f62649b54.zip |
Diffstat (limited to 'src/Root.h')
-rw-r--r-- | src/Root.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Root.h b/src/Root.h index 08aafe3c9..93117389e 100644 --- a/src/Root.h +++ b/src/Root.h @@ -53,8 +53,17 @@ public: // tolua_begin cServer * GetServer(void) { return m_Server; } cWorld * GetDefaultWorld(void); - cWorld * GetWorld(const AString & a_WorldName); - cWorld * CreateAndInitializeWorld(const AString & a_WorldName); + + /** Returns a pointer to the world specified + If no world of that name was currently loaded and a_SearchForFolder was true, it will consult cFile::IsFolder() to see if a world folder of that name exists and if so, initialise a world based on that name + */ + cWorld * GetWorld(const AString & a_WorldName, bool a_SearchForFolder = false); + + /** Returns a pointer to a world of specified name - will search loaded worlds first, then create anew if not found + The dimension parameter is used to create a world with a specific dimension + a_OverworldName should be set for non-overworld dimensions if one wishes that world to link back to an overworld via portals + */ + cWorld * CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension = dimOverworld, const AString & a_OverworldName = ""); // tolua_end /// Calls the callback for each world; returns true if the callback didn't abort (return true) |