From 635bb08fb9a1bb6073e1b328bd21e5e9167f0ef7 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 10 Nov 2019 19:39:07 -0500 Subject: [PATCH] Update playerskinpacket to use the strings --- src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php | 2 +- src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php b/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php index 2500849f52..8d86726285 100644 --- a/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php +++ b/src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter.php @@ -253,7 +253,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{ } public function handlePlayerSkin(PlayerSkinPacket $packet) : bool{ - return $this->player->changeSkin($packet->skin, "", ""); + return $this->player->changeSkin($packet->skin, $packet->newSkinName, $packet->oldSkinName); } public function handleBookEdit(BookEditPacket $packet) : bool{ diff --git a/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php b/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php index d40901c62c..82b03f05df 100644 --- a/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php +++ b/src/pocketmine/network/mcpe/protocol/PlayerSkinPacket.php @@ -41,20 +41,20 @@ class PlayerSkinPacket extends DataPacket{ /** @var string */ public $newSkinName = ""; /** @var string */ - public $unknownString = ""; //Sent as empty, assuming it is the old skin name + public $oldSkinName = ""; protected function decodePayload(){ $this->uuid = $this->getUUID(); $this->skin = $this->getSkin(); $this->newSkinName = $this->getString(); - $this->unknownString = $this->getString(); + $this->oldSkinName = $this->getString(); } protected function encodePayload(){ $this->putUUID($this->uuid); $this->putSkin($this->skin); $this->putString($this->newSkinName); - $this->putString($this->unknownString); + $this->putString($this->oldSkinName); } public function handle(NetworkSession $session) : bool{