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

Method ForEachPlayer

src/UI/Window.cpp:340–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339
340bool cWindow::ForEachPlayer(cItemCallback<cPlayer> & a_Callback)
341{
342 cCSLock Lock(m_CS);
343 for (cPlayerList::iterator itr = m_OpenedBy.begin(), end = m_OpenedBy.end(); itr != end; ++itr)
344 {
345 if (a_Callback.Item(*itr))
346 {
347 return false;
348 }
349 } // for itr - m_OpenedBy[]
350 return true;
351}
352
353
354

Callers 1

OnUseMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.80
ItemMethod · 0.45

Tested by

no test coverage detected