Package net.risingworld.api.objects
Class Skin
java.lang.Object
net.risingworld.api.objects.Skin
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
getBeard()
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
isNpc()
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
setGender
(Skin.Gender gender) 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.
-
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
Changes the gender of the character. You really want to change it "on the fly"?- Parameters:
gender
- the new 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.
-