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

How to add a cape to the player?

Discussion in 'Development' started by Minetron26, Oct 12, 2018.

  1. Minetron26

    Minetron26 Witch

    Messages:
    55
    GitHub:
    minetron26
    Hi!, I would like to know if there is a way to add a layer to the player, for example that when executing the command: "/cape" a cape was added to the player, and that it was created, and not necessarily of the Minecon, there is a way to do it?
     
  2. DiamondGamer30

    DiamondGamer30 Baby Zombie

    Messages:
    175
    GitHub:
    diamondgamermcpe
    You can use
    PHP:
    /** @var Player $player */
    /** @var string $capeData */
    $skin $player->getSkin();
    $player->setSkin(new Skin($skin->getSkinId(), $skin->getSkinData(), $capeData$skin->getGeometryName(), $skin->getGeometryData()));
     
    Minetron26 likes this.
  3. Minetron26

    Minetron26 Witch

    Messages:
    55
    GitHub:
    minetron26
    Thanks!, then I must define the string $capeData, or no?
     
  4. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Yes.
     
    Minetron26 likes this.
  5. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    I need some help with the capes too. Could anyone give me a random working cape png?
     
    Minetron26 likes this.
  6. GiantQuartz

    GiantQuartz Spider

    Messages:
    7

    Attached Files:

  7. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    thanks but it's too late
    I used the method of patar and saved the cape in a file
     
  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.