summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-15 10:13:32 +0100
committermadmaxoft <github@xoft.cz>2013-11-15 10:13:32 +0100
commit90fc51c4d03a941035b07d9d303ec542ff257b8b (patch)
tree23e4e71364a190e0c14436e382d0bb32cc6bd22f
parentAPIDump: Removed the BlockEntity constructors' docs. (diff)
downloadcuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar.gz
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar.bz2
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar.lz
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar.xz
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.tar.zst
cuberite-90fc51c4d03a941035b07d9d303ec542ff257b8b.zip
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua2
-rw-r--r--source/Root.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index cd3fe366a..9f95ce5e3 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1976,7 +1976,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
GetWebAdmin = { Params = "", Return = "{{cWebAdmin|cWebAdmin}}", Notes = "Returns the cWebAdmin object." },
GetWorld = { Params = "WorldName", Return = "{{cWorld|cWorld}}", Notes = "Returns the cWorld object of the given world. It returns nil if there is no world with the given name." },
QueueExecuteConsoleCommand = { Params = "Message", Return = "", Notes = "Queues a console command for execution through the cServer class. The command will be executed in the tick thread. The command's output will be sent to console." },
- SaveAllChunks = { Params = "", Return = "", Notes = "Saves all the chunks in all the worlds." },
+ SaveAllChunks = { Params = "", Return = "", Notes = "Saves all the chunks in all the worlds. Note that the saving is queued on each world's tick thread and this functions returns before the chunks are actually saved." },
SetPrimaryServerVersion = { Params = "Protocol Version", Return = "", Notes = "Sets the servers PrimaryServerVersion to the given protocol number." }
},
Constants =
diff --git a/source/Root.cpp b/source/Root.cpp
index 701832be7..be5a0553c 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -489,7 +489,7 @@ void cRoot::SaveAllChunks(void)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); ++itr)
{
- itr->second->SaveAllChunks();
+ itr->second->QueueSaveAllChunks();
}
}