OfflinePlayer: fix reading wrong NBT type in getFirstPlayed(), close #3112

This bug was introduced by 65927e69651652917c928990fb8643cfa33f0096.
This commit is contained in:
Dylan K. Taylor 2019-09-04 07:58:58 +01:00
parent f755ea6043
commit 1866de269b

View File

@ -103,7 +103,7 @@ class OfflinePlayer implements IPlayer{
}
public function getFirstPlayed() : ?int{
return ($this->namedtag !== null and $this->namedtag->hasTag("firstPlayed", LongTag::class)) ? $this->namedtag->getInt("firstPlayed") : null;
return ($this->namedtag !== null and $this->namedtag->hasTag("firstPlayed", LongTag::class)) ? $this->namedtag->getLong("firstPlayed") : null;
}
public function getLastPlayed() : ?int{