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

Method SendPlayerList

src/World.cpp:2488–2500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2486
2487
2488void cWorld::SendPlayerList(cPlayer * a_DestPlayer)
2489{
2490 // Sends the playerlist to a_DestPlayer
2491 cCSLock Lock(m_CSPlayers);
2492 for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
2493 {
2494 cClientHandle * ch = (*itr)->GetClientHandle();
2495 if ((ch != NULL) && !ch->IsDestroyed())
2496 {
2497 a_DestPlayer->GetClientHandle()->SendPlayerListItem(*(*itr), true);
2498 }
2499 }
2500}
2501
2502
2503

Callers 1

TickMethod · 0.80

Calls 5

beginMethod · 0.80
endMethod · 0.80
GetClientHandleMethod · 0.80
IsDestroyedMethod · 0.45
SendPlayerListItemMethod · 0.45

Tested by

no test coverage detected