diff --git a/src/Syams255/entity/PlayerCorpse.php b/src/Syams255/entity/PlayerCorpse.php index 72455ef..4e7fa88 100644 --- a/src/Syams255/entity/PlayerCorpse.php +++ b/src/Syams255/entity/PlayerCorpse.php @@ -28,7 +28,7 @@ public function __construct(Level $level, CompoundTag $nbt, Player $player = nul ]), ]); $player->saveNBT(); - $nbt->Skin = new CompoundTag("Skin", ["Data" => new StringTag("Data", $player->getSkinData()), "Name" => new StringTag("Name", $player->getSkinId())]); + $nbt->Skin = new CompoundTag("Skin", ["Data" => new StringTag("Data", $player->getSkin()->getSkinData()), "Name" => new StringTag("Name", $player->getSkin()->getSkinId())]); parent::__construct($level, $nbt); $this->setDataProperty(Human::DATA_PLAYER_BED_POSITION, Human::DATA_TYPE_POS, [(int)$player->x, (int)$player->y, (int)$player->z]); $this->setDataFlag(Human::DATA_PLAYER_FLAGS, Human::DATA_PLAYER_FLAG_SLEEP, true, Human::DATA_TYPE_BYTE);