mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
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:
@ -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(){
|
||||
|
Reference in New Issue
Block a user