Merge branch 'stable' of https://github.com/drew-mcbe/pocketmine-mp into drew-1.13

This commit is contained in:
Dylan K. Taylor
2019-11-11 05:48:17 -05:00
9 changed files with 69 additions and 152 deletions

View File

@ -36,25 +36,25 @@ class PlayerSkinPacket extends DataPacket{
/** @var UUID */
public $uuid;
/** @var Skin */
public $skin;
/** @var string */
public $oldSkinName = "";
/** @var string */
public $newSkinName = "";
/** @var string */
public $unknownString = ""; //Sent as empty, assuming it is the old skin name
/** @var Skin */
public $skin;
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{

View File

@ -54,7 +54,7 @@ class PlayerListEntry{
return $entry;
}
public static function createAdditionEntry(UUID $uuid, int $entityUniqueId, string $username, Skin $skin, string $xboxUserId = "", string $platformChatId = "", int $buildPlatform = 0, bool $isTeacher = false, bool $isHost = false) : PlayerListEntry{
public static function createAdditionEntry(UUID $uuid, int $entityUniqueId, string $username, Skin $skin, string $xboxUserId = "", string $platformChatId = "", int $buildPlatform = -1, bool $isTeacher = false, bool $isHost = false) : PlayerListEntry{
$entry = new PlayerListEntry();
$entry->uuid = $uuid;
$entry->entityUniqueId = $entityUniqueId;