diff options
author | b33duck <b33duck@gmail.com> | 2015-05-28 22:17:21 +0200 |
---|---|---|
committer | b33duck <b33duck@gmail.com> | 2015-05-29 04:43:16 +0200 |
commit | 022348645e5f4a39c57ab6c899dd9de12bcb3794 (patch) | |
tree | 150ae108fa58f6c9f9f842c1bb50906315f6921a /src/Root.cpp | |
parent | Updated DumpInfo plugin. (diff) | |
download | cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar.gz cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar.bz2 cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar.lz cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar.xz cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.tar.zst cuberite-022348645e5f4a39c57ab6c899dd9de12bcb3794.zip |
Diffstat (limited to 'src/Root.cpp')
-rw-r--r-- | src/Root.cpp | 19 |
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) |