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

Set Player Cape

Discussion in 'Development' started by Herojhjh, Mar 11, 2018.

  1. Herojhjh

    Herojhjh Silverfish

    Messages:
    20
    GitHub:
    herojhjh
    PHP:
    $skin $player->getSkin();
    $player->setSkin(new Skin($skin->getSkinId(), $skin->getSkinData(), "What ?"$skin->getGeometryName(), $skin->getGeometryData()));
    How to set player cape? what i need to use?
     
  2. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    correct me if im wrong, but capes ain't an addon, they are part of a skin and can only be used in skinpacks
     
    LewBr likes this.
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Potatoe is right, you can get the SkinData of an skin that has a cape and then set that skindata.
     
  4. Herojhjh

    Herojhjh Silverfish

    Messages:
    20
    GitHub:
    herojhjh
    I already try that but fail.
    1. Get my cape data and encode the data with base64
    2. When player join server decode with base 64 and set the player skin.
    3. No error when player join but no cape
     
  5. Herojhjh

    Herojhjh Silverfish

    Messages:
    20
    GitHub:
    herojhjh
    idk, but on 1.1 i can set player a cape or maybe changed on 1.2?
     
  6. di2134876

    di2134876 Spider Jockey

    Messages:
    29
    GitHub:
    dk1234987
    As potatoe said, the cape is client-sided
     
  7. SleepSpace9

    SleepSpace9 Slime

    Messages:
    78
    GitHub:
    sleepspace9
    I do not agree, it's not only client-sided. I've created a plugin that read the cape data from png and send it to the player. It took very long to figure out, in which order to read the pixel from my cape image, but finally got it working.
    Please do not ask me for the plugin, it's part of my server and I would like to keep it as feature that make it more unique.
     
  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.