1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How can I add cape to player?

Discussion in 'Development' started by 7awariGamer, Jul 31, 2019.

  1. 7awariGamer

    7awariGamer Baby Zombie

    Messages:
    120
    GitHub:
    7awariGamer
    Is there something like addCape()?
     
  2. ExZe

    ExZe Silverfish

    Messages:
    21
    GitHub:
    mzztin
    Not that I would know. You can add a cape that everyones sees with some things (IOBit and a Cape)
     
  3. 7awariGamer

    7awariGamer Baby Zombie

    Messages:
    120
    GitHub:
    7awariGamer
    I tried this way :
    PHP:
    $path $this->getDataFolder() . "cape_youtube.png";
                       
    $oldSkin $player->getSkin();
                       
    $capeData = @imagecreatefrompng($path);
                       
    $skin = new Skin($oldSkin->getSkinId(), $oldSkin->getSkinData(), $capeData$oldSkin->getGeometryName(), $oldSkin->getGeometryData());
                       
    $player->setSkin($skin);
                       
    $player->sendSkin();
    But I think it is for old api , it still shows me error
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.