mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-26 05:14:05 +00:00
Update playerskinpacket to use the strings
This commit is contained in:
parent
54530da6c1
commit
635bb08fb9
@ -253,7 +253,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handlePlayerSkin(PlayerSkinPacket $packet) : bool{
|
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{
|
public function handleBookEdit(BookEditPacket $packet) : bool{
|
||||||
|
@ -41,20 +41,20 @@ class PlayerSkinPacket extends DataPacket{
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $newSkinName = "";
|
public $newSkinName = "";
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $unknownString = ""; //Sent as empty, assuming it is the old skin name
|
public $oldSkinName = "";
|
||||||
|
|
||||||
protected function decodePayload(){
|
protected function decodePayload(){
|
||||||
$this->uuid = $this->getUUID();
|
$this->uuid = $this->getUUID();
|
||||||
$this->skin = $this->getSkin();
|
$this->skin = $this->getSkin();
|
||||||
$this->newSkinName = $this->getString();
|
$this->newSkinName = $this->getString();
|
||||||
$this->unknownString = $this->getString();
|
$this->oldSkinName = $this->getString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload(){
|
protected function encodePayload(){
|
||||||
$this->putUUID($this->uuid);
|
$this->putUUID($this->uuid);
|
||||||
$this->putSkin($this->skin);
|
$this->putSkin($this->skin);
|
||||||
$this->putString($this->newSkinName);
|
$this->putString($this->newSkinName);
|
||||||
$this->putString($this->unknownString);
|
$this->putString($this->oldSkinName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $session) : bool{
|
public function handle(NetworkSession $session) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user