mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
Player: remove useless checks from save()
this should never be called for a player with an empty username (because data isn't saved unless the player was spawned) and the instanceof is laughable.
This commit is contained in:
parent
55ac1c80c9
commit
16b789a528
@ -2945,10 +2945,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$this->namedtag->setInt("playerGameType", $this->gamemode);
|
||||
$this->namedtag->setLong("lastPlayed", (int) floor(microtime(true) * 1000));
|
||||
|
||||
if($this->username != "" and $this->namedtag instanceof CompoundTag){
|
||||
$this->server->saveOfflinePlayerData($this->username, $this->namedtag, $async);
|
||||
}
|
||||
}
|
||||
|
||||
public function kill() : void{
|
||||
if(!$this->spawned){
|
||||
|
Loading…
x
Reference in New Issue
Block a user