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