pocketmine\Player::setDisplayName PHP Method

setDisplayName() public method

public setDisplayName ( string $name )
$name string
    public function setDisplayName($name)
    {
        $this->displayName = $name;
        if ($this->spawned) {
            $this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getDisplayName(), $this->getSkinId(), $this->getSkinData());
        }
    }
Player