added API to get player language code

sadly this isn't particularly useful without something like the intl
extension to translate the language codes to ISO-632-1 codes like the
ones PocketMine-MP uses. However, this will do for now.
This commit is contained in:
Dylan K. Taylor
2017-11-04 15:49:53 +00:00
parent 2ec7763bd6
commit 6ccb494f8d
2 changed files with 19 additions and 0 deletions

View File

@ -50,6 +50,8 @@ class LoginPacket extends DataPacket{
public $identityPublicKey;
/** @var string */
public $serverAddress;
/** @var string */
public $locale;
/** @var array (the "chain" index contains one or more JWTs) */
public $chainData = [];
@ -119,6 +121,8 @@ class LoginPacket extends DataPacket{
$this->clientId = $this->clientData["ClientRandomId"] ?? null;
$this->serverAddress = $this->clientData["ServerAddress"] ?? null;
$this->locale = $this->clientData["LanguageCode"] ?? null;
}
protected function encodePayload(){