mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-21 10:51:24 +00:00
Do not show playerNotFound notice if player data should not be saved
This commit is contained in:
parent
d6fd9259cf
commit
2a07638af3
@ -696,7 +696,8 @@ class Server{
|
||||
public function getOfflinePlayerData($name){
|
||||
$name = strtolower($name);
|
||||
$path = $this->getDataPath() . "players/";
|
||||
if($this->shouldSavePlayerData() and file_exists($path . "$name.dat")){
|
||||
if($this->shouldSavePlayerData()){
|
||||
if(file_exists($path . "$name.dat")){
|
||||
try{
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
$nbt->readCompressed(file_get_contents($path . "$name.dat"));
|
||||
@ -709,6 +710,7 @@ class Server{
|
||||
}else{
|
||||
$this->logger->notice($this->getLanguage()->translateString("pocketmine.data.playerNotFound", [$name]));
|
||||
}
|
||||
}
|
||||
$spawn = $this->getDefaultLevel()->getSafeSpawn();
|
||||
$nbt = new CompoundTag("", [
|
||||
new LongTag("firstPlayed", floor(microtime(true) * 1000)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user