Moved some stuff from join to login

this is how it should be
This commit is contained in:
Dylan K. Taylor 2017-10-08 19:38:03 +01:00
parent fdfe70b9f2
commit 1a88f59b23
2 changed files with 7 additions and 9 deletions

View File

@ -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);

View File

@ -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;
}