Skip to content

Commit

Permalink
Use microtime
Browse files Browse the repository at this point in the history
  • Loading branch information
zSALLAZAR committed Sep 29, 2023
1 parent 6efd4b7 commit 9396d18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ public function getSaveData() : CompoundTag{

$nbt->setInt(self::TAG_GAME_MODE, GameModeIdMap::getInstance()->toId($this->gamemode));
$nbt->setLong(self::TAG_FIRST_PLAYED, (int) $this->firstPlayed->format('Uv'));
$nbt->setLong(self::TAG_LAST_PLAYED, (int) (new DateTimeImmutable())->format('Uv'));
$nbt->setLong(self::TAG_LAST_PLAYED, (int) floor(microtime(true) * 1000));

return $nbt;
}
Expand Down

0 comments on commit 9396d18

Please sign in to comment.