Class Skin

java.lang.Object
net.risingworld.api.objects.Skin

public final class Skin extends Object
An object representing the current visual appearance of players and human npc. This includes gender, skin color, hair color, hair cut etc.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Skin(long handle, boolean npc)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Gets the beard of the player.
    int
    Gets the eye color of the character.
    Gets the gender of the character.
    int
    Gets the hair color of the character.
    byte
    Gets the hairstyle of the player.
    int
    Gets the skin color of the character.
    byte
    Gets the variation of the skin.
    boolean
    Gets whether this skin object belongs to an npc or to a player.
    void
    setBeard(byte id)
    Changes the beard of the player.
    void
    setEyeColor(int rgb)
    Changes the eye color of the character.
    void
    Changes the gender of the character.
    void
    setHairColor(int rgb)
    Changes the hair color of the character.
    void
    setHairstyle(byte id)
    Changes the hairstyle of the player.
    void
    setSkinColor(int rgb)
    Changes the skin color of the character.
    void
    setVariation(byte variation)
    Sets the variation of the skin.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Skin

      protected Skin(long handle, boolean npc)
  • Method Details

    • isNpc

      public boolean isNpc()
      Gets whether this skin object belongs to an npc or to a player.
      Returns:
      true if this is represents the skin of an npc, false if it represents the skin of a player.
    • setGender

      public void setGender(Skin.Gender gender)
      Changes the gender of the character. You really want to change it "on the fly"?
      Parameters:
      gender - the new gender.
    • getGender

      public Skin.Gender getGender()
      Gets the gender of the character.
      Returns:
      the characters gender.
    • setSkinColor

      public void setSkinColor(int rgb)
      Changes the skin color of the character.
      Parameters:
      rgb - the int RGB color value (e.g 0xFFFFFF).
    • getSkinColor

      public int getSkinColor()
      Gets the skin color of the character.
      Returns:
      the RGB skin color.
    • setHairColor

      public void setHairColor(int rgb)
      Changes the hair color of the character.
      Parameters:
      rgb - the int RGB color value (e.g 0xFFFFFF).
    • getHairColor

      public int getHairColor()
      Gets the hair color of the character.
      Returns:
      the RGB hair color.
    • setEyeColor

      public void setEyeColor(int rgb)
      Changes the eye color of the character.
      Parameters:
      rgb - the int RGB color value (e.g 0xFFFFFF).
    • getEyeColor

      public int getEyeColor()
      Gets the eye color of the character.
      Returns:
      the RGB eye color.
    • setHairstyle

      public void setHairstyle(byte id)
      Changes the hairstyle of the player. Set -1 for no hair (bald head). If the ID is invalid, no haircut will be set.
      Parameters:
      id - the hairstyle ID
    • getHairstyle

      public byte getHairstyle()
      Gets the hairstyle of the player. Returns -1 if no hairstyle is set (i.e bald head).
      Returns:
      the hairstyle ID of the player, or -1 if no haircut is set.
    • setBeard

      public void setBeard(byte id)
      Changes the beard of the player. Set -1 to remove the beard. If the ID is invalid, no beard will be set.
      Parameters:
      id - the beard ID
    • getBeard

      public byte getBeard()
      Gets the beard of the player. Returns -1 if the player has no beard.
      Returns:
      the beard ID of the player, or -1 if no beard is set.
    • setVariation

      public void setVariation(byte variation)
      Sets the variation of the skin. Only used for certain npc.
      Parameters:
      variation - the new variation. Default variation is 0.
    • getVariation

      public byte getVariation()
      Gets the variation of the skin. Only used for certain npc.
      Returns:
      the variation. Default variation is 0.