Skip to content

PlayerInfo ​

class · pocketmine\player\PlayerInfo · source

Encapsulates data needed to create a player.

Methods ​

__construct() ​

php
public function __construct(string $username, \Ramsey\Uuid\UuidInterface $uuid, \pocketmine\entity\Skin $skin, string $locale, array $extraData = [], ?\pocketmine\network\mcpe\protocol\types\skin\SkinData $networkSkinData = null)

getExtraData() ​

php
public function getExtraData() : array

getLocale() ​

php
public function getLocale() : string

getNetworkSkinData() 5.46.0 ​

php
public function getNetworkSkinData() : ?\pocketmine\network\mcpe\protocol\types\skin\SkinData

Returns the skin exactly as the client sent it at login (persona pieces, tints, profile hash, ...), if known. Since 1.26.40 the vanilla client expects this data to be echoed back faithfully in the player list, so this is preferred over the lossy Skin -> SkinData conversion where available.

getSkin() ​

php
public function getSkin() : \pocketmine\entity\Skin

getUsername() ​

php
public function getUsername() : string

getUuid() ​

php
public function getUuid() : \Ramsey\Uuid\UuidInterface

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.