From 1a88f59b2380c486690125b1995793cde4c77441 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 8 Oct 2017 19:38:03 +0100 Subject: [PATCH] Moved some stuff from join to login this is how it should be --- src/pocketmine/Player.php | 14 ++++++-------- src/pocketmine/inventory/BaseInventory.php | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 0bb0db213..118a618e3 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -952,14 +952,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ protected function doFirstSpawn(){ $this->spawned = true; - $this->sendSettings(); - $this->sendPotionEffects($this); - - $this->sendData($this); - $this->inventory->sendContents($this); - $this->inventory->sendArmorContents($this); - $this->inventory->sendHeldItem($this); - $this->sendPlayStatus(PlayStatusPacket::PLAYER_SPAWN); if($this->hasPermission(Server::BROADCAST_CHANNEL_USERS)){ @@ -2015,8 +2007,14 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } $this->sendCommandData(); + $this->sendSettings(); + $this->sendPotionEffects($this); + $this->sendData($this); + $this->inventory->sendContents($this); + $this->inventory->sendArmorContents($this); $this->inventory->sendCreativeContents(); + $this->inventory->sendHeldItem($this); $this->server->addOnlinePlayer($this); $this->server->onPlayerCompleteLoginSequence($this); diff --git a/src/pocketmine/inventory/BaseInventory.php b/src/pocketmine/inventory/BaseInventory.php index 052b57443..22c83197d 100644 --- a/src/pocketmine/inventory/BaseInventory.php +++ b/src/pocketmine/inventory/BaseInventory.php @@ -402,7 +402,7 @@ abstract class BaseInventory implements Inventory{ } foreach($target as $player){ - if(($id = $player->getWindowId($this)) === ContainerIds::NONE or $player->spawned !== true){ + if(($id = $player->getWindowId($this)) === ContainerIds::NONE){ $this->close($player); continue; }