Server: added API method hasOfflinePlayerData()

This commit is contained in:
Dylan K. Taylor
2018-09-27 16:36:42 +01:00
parent 3bb22f9778
commit 9d8898a4ed
2 changed files with 13 additions and 4 deletions

View File

@@ -735,6 +735,17 @@ class Server{
return $result;
}
/**
* Returns whether the server has stored any saved data for this player.
*
* @param string $name
*
* @return bool
*/
public function hasOfflinePlayerData(string $name) : bool{
return file_exists($this->getDataPath() . "players/$name.dat");
}
/**
* @param string $name
*