pocketmine\OfflinePlayer::__construct PHP Method

__construct() public method

public __construct ( Server $server, string $name )
$server Server
$name string
    public function __construct(Server $server, $name)
    {
        $this->server = $server;
        $this->name = $name;
        if (file_exists($this->server->getDataPath() . "players/" . strtolower($this->getName()) . ".dat")) {
            $this->namedtag = $this->server->getOfflinePlayerData($this->name);
        } else {
            $this->namedtag = null;
        }
    }