summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-29 10:57:31 +0200
committerMattes D <github@xoft.cz>2015-05-29 10:57:31 +0200
commit6adf5f5e008cd143b05240cd9886cb98e61e77f4 (patch)
tree64f918963af98da2edac09da1c420bea1773ce8d /src/Root.cpp
parentFixed Info.lua documentation (diff)
parentMerge branch 'Issue2106' of https://github.com/beeduck/MCServer into Issue2106 (diff)
downloadcuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar.gz
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar.bz2
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar.lz
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar.xz
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.tar.zst
cuberite-6adf5f5e008cd143b05240cd9886cb98e61e77f4.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index b28e7c894..54e65b6da 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -558,6 +558,23 @@ void cRoot::SaveAllChunks(void)
+void cRoot::SendPlayerLists(cPlayer * a_DestPlayer)
+{
+ for (const auto & itr : m_WorldsByName)
+ {
+ itr.second->SendPlayerList(a_DestPlayer);
+ } // for itr - m_WorldsByName[]
+}
+
+
+
+void cRoot::BroadcastPlayerListsAddPlayer(const cPlayer & a_Player, const cClientHandle * a_Exclude)
+{
+ for (const auto & itr : m_WorldsByName)
+ {
+ itr.second->BroadcastPlayerListAddPlayer(a_Player);
+ } // for itr - m_WorldsByName[]
+}
void cRoot::BroadcastChat(const AString & a_Message, eMessageType a_ChatPrefix)
@@ -582,8 +599,6 @@ void cRoot::BroadcastChat(const cCompositeChat & a_Message)
-
-
bool cRoot::ForEachPlayer(cPlayerListCallback & a_Callback)
{
for (WorldMap::iterator itr = m_WorldsByName.begin(), itr2 = itr; itr != m_WorldsByName.end(); itr = itr2)