Don't record player on stats until they actually exist

This commit is contained in:
Dylan K. Taylor 2019-03-14 14:46:19 +00:00
parent ebfe9caca3
commit a1ffaffa7f
2 changed files with 4 additions and 7 deletions

View File

@ -1799,7 +1799,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
public function onLoginSuccess() : void{
$this->loggedIn = true;
$this->server->onPlayerLogin($this);
}
public function _actuallyConstruct(){

View File

@ -1866,16 +1866,14 @@ class Server{
}
}
public function onPlayerLogin(Player $player) : void{
if($this->sendUsageTicker > 0){
$this->uniquePlayers[$player->getRawUniqueId()] = $player->getRawUniqueId();
}
}
public function addOnlinePlayer(Player $player) : void{
$this->updatePlayerListData($player->getUniqueId(), $player->getId(), $player->getDisplayName(), $player->getSkin(), $player->getXuid());
$this->playerList[$player->getRawUniqueId()] = $player;
if($this->sendUsageTicker > 0){
$this->uniquePlayers[$player->getRawUniqueId()] = $player->getRawUniqueId();
}
}
public function removeOnlinePlayer(Player $player) : void{