MCPcopy Create free account
hub / github.com/cuberite/cuberite / ForEachPlayer

Method ForEachPlayer

src/World.cpp:2382–2395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2380
2381
2382bool cWorld::ForEachPlayer(cPlayerListCallback & a_Callback)
2383{
2384 // Calls the callback for each player in the list
2385 cCSLock Lock(m_CSPlayers);
2386 for (cPlayerList::iterator itr = m_Players.begin(), itr2 = itr; itr != m_Players.end(); itr = itr2)
2387 {
2388 ++itr2;
2389 if (a_Callback.Item(*itr))
2390 {
2391 return false;
2392 }
2393 } // for itr - m_Players[]
2394 return true;
2395}
2396
2397
2398

Callers

nothing calls this directly

Calls 3

beginMethod · 0.80
endMethod · 0.80
ItemMethod · 0.45

Tested by

no test coverage detected