Try this code PHP: public function spawnNPC(Player $player) { $nbt = new CompoundTag; $nbt->Pos = new ListTag("Pos", [ new DoubleTag("", $player->getX()), new DoubleTag("", $player->getY()), new DoubleTag("", $player->getZ()) ]); $nbt->Motion = new ListTag("Motion", [ new DoubleTag("", 0), new DoubleTag("", 0), new DoubleTag("", 0) ]); $nbt->Rotation = new ListTag("Rotation", [ new FloatTag("", $player->getYaw()), new FloatTag("", $player->getPitch()) ]); $nbt->Health = new ShortTag("Health", 20); $nbt->Skin = new CompoundTag("Skin", [ "Data" => new StringTag("Data", $player->getSkin()->getSkinData()), "Name" => new StringTag("Name", $player->getSkin()->getSkinId())]); $human = new Human($player->getLevel(), $nbt); $human->setNameTag($player->getName()); $human->setNameTagVisible(false); $human->spawnTo($player);}