fixed some players being invisible if they join while other players are joining

This commit is contained in:
GameHerobrine 2025-07-17 13:53:33 +03:00
parent aa39b77156
commit 26516699c7
2 changed files with 3 additions and 3 deletions

View file

@ -497,7 +497,7 @@ class PlayerAPI{
public function spawnToAllPlayers(Player $player){
foreach($this->getAll() as $p){
if($p !== $player and ($p->entity instanceof Entity) and ($player->entity instanceof Entity)){
if($p->spawned && $p !== $player && ($p->entity instanceof Entity) && ($player->entity instanceof Entity)){
$player->entity->spawn($p);
if($p->level !== $player->level){
$pk = new MoveEntityPacket_PosRot;