Player: add getPlayerInfo(), closes #4450

This commit is contained in:
Dylan K. Taylor 2021-09-17 22:17:36 +01:00
parent 87dc763d92
commit 3836a57ba6
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -340,6 +340,12 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
return $this->authenticated;
}
/**
* Returns an object containing information about the player, such as their username, skin, and misc extra
* client-specific data.
*/
public function getPlayerInfo() : PlayerInfo{ return $this->playerInfo; }
/**
* If the player is logged into Xbox Live, returns their Xbox user ID (XUID) as a string. Returns an empty string if
* the player is not logged into Xbox Live.