https://github.com/pmmp/PocketMine-...a8822c8873/src/pocketmine/entity/Skin.php#L33 PHP: $oldSkin = $player->getSkin();$capeData = "...";$skin = new Skin($oldSkin->getSkinId(), $oldSkin->getSkinData(), $capeData, $oldSkin->getGeometryName(), $oldSkin->getGeometryData());$player->setSkin($skin);$player->sendSkin(); Basic example of how to set the cape. $capeData should be a 8192 char long ARGB blob, which you can get from a PNG using GD
PHP: $oldSkin = $player->getSkin();$capeData = @imagecreatefrompng(/path/to/cape.png);$skin = new Skin($oldSkin->getSkinId(), $oldSkin->getSkinData(), $capeData, $oldSkin->getGeometryName(), $oldSkin->getGeometryData());$player->setSkin($skin);$player->sendSkin();