How have a skin for a NPC

Discussion in 'Plugin Development' started by pollag, Dec 30, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    pollag

    I would like to know how I can change the skin for a npc (I can modify bukkit if it need). To have a NPC like this (this server haven't Spout, laucher) 2012-12-30_11.24.04.png
     
  2. Offline

    fireblast709

    Probably Citizens
     
  3. Offline

    _Ass4ssin_

    I think they used the minecraft skin database, if you name the npc to a player that exist it gets the skin of the player. I might be wrong but I believe they did it like that.
     
  4. Offline

    fireblast709

    That is how it is done, yes.
     
  5. Offline

    pollag

    Do you think it should be modified bukkit or it's a plugin ?
     
  6. Offline

    fireblast709

    it can be done with a plugin
     
  7. Offline

    pollag

    How I can do ? In the class Player they are no field for the skin ?
     
  8. Offline

    fireblast709

    How do you spawn your NPC, for starters
     
  9. Offline

    tommycake50

    thats because the client gets the skin from the name ill post some psuedo code from the mc source.
    this is basically how it does it this is spread across 2 classes but w/e
    url skin = "http://skins.minecraft.net/MinecraftSkins/" + nameofotherplayer + ".png"
    connection con = skin.connect
    image playerskin = image.load(connection.input)
     
  10. Offline

    pollag

    The skin configuration is only on the client ? we can't send an skin url ?
     
  11. Offline

    tommycake50

    no the client gets the skin from the player name.
    when you code mods you come across these things.
     
Thread Status:
Not open for further replies.

Share This Page