PlayerListPacket: fixup on platformChatId stuff

This commit is contained in:
Dylan K. Taylor 2018-04-07 10:33:24 +01:00
parent 4b16be7e0b
commit 9a5f9c8586
2 changed files with 6 additions and 5 deletions

View File

@ -73,7 +73,7 @@ class PlayerListPacket extends DataPacket{
$geometryData
);
$entry->xboxUserId = $this->getString();
$this->getString(); //unknown
$entry->platformChatId = $this->getString();
}else{
$entry->uuid = $this->getUUID();
}
@ -98,7 +98,7 @@ class PlayerListPacket extends DataPacket{
$this->putString($entry->skin->getGeometryName());
$this->putString($entry->skin->getGeometryData());
$this->putString($entry->xboxUserId);
$this->putString("");
$this->putString($entry->platformChatId);
}else{
$this->putUUID($entry->uuid);
}

View File

@ -38,12 +38,12 @@ class PlayerListEntry{
public $thirdPartyName = "";
/** @var int */
public $platform = 0;
/** @var string */
public $platformChatId = "";
/** @var Skin */
public $skin;
/** @var string */
public $xboxUserId;
/** @var string */
public $platformChatId = "";
public static function createRemovalEntry(UUID $uuid) : PlayerListEntry{
$entry = new PlayerListEntry();
@ -52,7 +52,7 @@ class PlayerListEntry{
return $entry;
}
public static function createAdditionEntry(UUID $uuid, int $entityUniqueId, string $username, string $thirdPartyName, int $platform, Skin $skin, string $xboxUserId = "") : PlayerListEntry{
public static function createAdditionEntry(UUID $uuid, int $entityUniqueId, string $username, string $thirdPartyName, int $platform, Skin $skin, string $xboxUserId = "", string $platformChatId = "") : PlayerListEntry{
$entry = new PlayerListEntry();
$entry->uuid = $uuid;
$entry->entityUniqueId = $entityUniqueId;
@ -61,6 +61,7 @@ class PlayerListEntry{
$entry->platform = $platform;
$entry->skin = $skin;
$entry->xboxUserId = $xboxUserId;
$entry->platformChatId = $platformChatId;
return $entry;
}