mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Small de-spaghettification of login handling
no need for these to be split up, it just makes the player login code flow look confusing.
This commit is contained in:
parent
533d139385
commit
973d5dc251
@ -2080,9 +2080,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$this->armorInventory->sendContents($this);
|
$this->armorInventory->sendContents($this);
|
||||||
$this->inventory->sendCreativeContents();
|
$this->inventory->sendCreativeContents();
|
||||||
$this->inventory->sendHeldItem($this);
|
$this->inventory->sendHeldItem($this);
|
||||||
|
$this->dataPacket($this->server->getCraftingManager()->getCraftingDataPacket());
|
||||||
|
|
||||||
$this->server->addOnlinePlayer($this);
|
$this->server->addOnlinePlayer($this);
|
||||||
$this->server->onPlayerCompleteLoginSequence($this);
|
$this->server->sendFullPlayerListData($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2253,11 +2253,6 @@ class Server{
|
|||||||
$this->loggedInPlayers[$player->getRawUniqueId()] = $player;
|
$this->loggedInPlayers[$player->getRawUniqueId()] = $player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onPlayerCompleteLoginSequence(Player $player){
|
|
||||||
$this->sendFullPlayerListData($player);
|
|
||||||
$player->dataPacket($this->craftingManager->getCraftingDataPacket());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function onPlayerLogout(Player $player){
|
public function onPlayerLogout(Player $player){
|
||||||
unset($this->loggedInPlayers[$player->getRawUniqueId()]);
|
unset($this->loggedInPlayers[$player->getRawUniqueId()]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user