summaryrefslogtreecommitdiffstats
path: root/src/Root.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-31 23:17:49 +0200
committermadmaxoft <github@xoft.cz>2014-07-31 23:17:49 +0200
commit6d02fce9a26d4272baea08dc58238321cca0183a (patch)
tree0109076ae52c67513259d7946a44b9f7b5a563fb /src/Root.h
parentRemoved trailing whitespace. (diff)
parentMerge pull request #1267 from mc-server/RoofedForest (diff)
downloadcuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.gz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.bz2
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.lz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.xz
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.tar.zst
cuberite-6d02fce9a26d4272baea08dc58238321cca0183a.zip
Diffstat (limited to '')
-rw-r--r--src/Root.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Root.h b/src/Root.h
index 210c36ea9..5cb82edda 100644
--- a/src/Root.h
+++ b/src/Root.h
@@ -54,8 +54,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)