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

Method BroadcastPlayerListItem

src/World.cpp:1996–2008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1994
1995
1996void cWorld::BroadcastPlayerListItem (const cPlayer & a_Player, bool a_IsOnline, const cClientHandle * a_Exclude)
1997{
1998 cCSLock Lock(m_CSPlayers);
1999 for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
2000 {
2001 cClientHandle * ch = (*itr)->GetClientHandle();
2002 if ((ch == a_Exclude) || (ch == NULL) || !ch->IsLoggedIn() || ch->IsDestroyed())
2003 {
2004 continue;
2005 }
2006 ch->SendPlayerListItem(a_Player, a_IsOnline);
2007 }
2008}
2009
2010
2011

Callers 1

~cClientHandleMethod · 0.80

Calls 6

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

Tested by

no test coverage detected