From 277197f0ec6c6f14d681426adf41e4f0529a0f47 Mon Sep 17 00:00:00 2001 From: jojoe77777 Date: Mon, 7 Nov 2016 08:42:53 +1100 Subject: [PATCH] Changed human skin sending May not affect anything --- Slapper/src/slapper/entities/SlapperHuman.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Slapper/src/slapper/entities/SlapperHuman.php b/Slapper/src/slapper/entities/SlapperHuman.php index ccc55a0..c346366 100755 --- a/Slapper/src/slapper/entities/SlapperHuman.php +++ b/Slapper/src/slapper/entities/SlapperHuman.php @@ -77,16 +77,9 @@ public function spawnTo(Player $player) { $pk->metadata[self::DATA_NAMETAG] = [self::DATA_TYPE_STRING, $this->getDisplayName($player)]; $player->dataPacket($pk); $this->inventory->sendArmorContents($player); - - $add = new PlayerListPacket(); - $add->type = 0; - $add->entries[] = [$uuid, $entityId, isset($this->namedtag->MenuName) ? $this->namedtag["MenuName"] : "", $this->skinId, $this->skin]; - $player->dataPacket($add); + $player->server->updatePlayerListData($uuid, $entityId, $this->namedtag["MenuName"] ?? "", $this->skinId, $this->skin, [$player]); if ($this->namedtag["MenuName"] === "") { - $remove = new PlayerListPacket(); - $remove->type = 1; - $remove->entries[] = [$uuid]; - $player->dataPacket($remove); + $player->server->removePlayerListData($uuid, [$player]); } } }