mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Don't record player on stats until they actually exist
This commit is contained in:
parent
ebfe9caca3
commit
a1ffaffa7f
@ -1799,7 +1799,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
|
|
||||||
public function onLoginSuccess() : void{
|
public function onLoginSuccess() : void{
|
||||||
$this->loggedIn = true;
|
$this->loggedIn = true;
|
||||||
$this->server->onPlayerLogin($this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function _actuallyConstruct(){
|
public function _actuallyConstruct(){
|
||||||
|
@ -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{
|
public function addOnlinePlayer(Player $player) : void{
|
||||||
$this->updatePlayerListData($player->getUniqueId(), $player->getId(), $player->getDisplayName(), $player->getSkin(), $player->getXuid());
|
$this->updatePlayerListData($player->getUniqueId(), $player->getId(), $player->getDisplayName(), $player->getSkin(), $player->getXuid());
|
||||||
|
|
||||||
$this->playerList[$player->getRawUniqueId()] = $player;
|
$this->playerList[$player->getRawUniqueId()] = $player;
|
||||||
|
|
||||||
|
if($this->sendUsageTicker > 0){
|
||||||
|
$this->uniquePlayers[$player->getRawUniqueId()] = $player->getRawUniqueId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeOnlinePlayer(Player $player) : void{
|
public function removeOnlinePlayer(Player $player) : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user