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

Method SetVisible

src/Entities/Player.cpp:1206–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1204
1205
1206void cPlayer::SetVisible(bool a_bVisible)
1207{
1208 if (a_bVisible && !m_bVisible) // Make visible
1209 {
1210 m_bVisible = true;
1211 m_World->BroadcastSpawnEntity(*this);
1212 }
1213 if (!a_bVisible && m_bVisible)
1214 {
1215 m_bVisible = false;
1216 m_World->BroadcastDestroyEntity(*this, m_ClientHandle); // Destroy on all clients
1217 }
1218}
1219
1220
1221

Callers

nothing calls this directly

Calls 2

BroadcastSpawnEntityMethod · 0.45

Tested by

no test coverage detected