Package net.risingworld.api.objects
Klasse 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.
-
Verschachtelte Klassen - Übersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbyte
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.
-
Konstruktordetails
-
Skin
protected Skin(long handle, boolean npc)
-
-
Methodendetails
-
isNpc
public boolean isNpc()Gets whether this skin object belongs to an npc or to a player.- Gibt zurück:
- 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"?- Parameter:
gender
- the new gender.
-
getGender
Gets the gender of the character.- Gibt zurück:
- the characters gender.
-
setSkinColor
public void setSkinColor(int rgb) Changes the skin color of the character.- Parameter:
rgb
- the int RGB color value (e.g 0xFFFFFF).
-
getSkinColor
public int getSkinColor()Gets the skin color of the character.- Gibt zurück:
- the RGB skin color.
-
setHairColor
public void setHairColor(int rgb) Changes the hair color of the character.- Parameter:
rgb
- the int RGB color value (e.g 0xFFFFFF).
-
getHairColor
public int getHairColor()Gets the hair color of the character.- Gibt zurück:
- the RGB hair color.
-
setEyeColor
public void setEyeColor(int rgb) Changes the eye color of the character.- Parameter:
rgb
- the int RGB color value (e.g 0xFFFFFF).
-
getEyeColor
public int getEyeColor()Gets the eye color of the character.- Gibt zurück:
- 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.- Parameter:
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).- Gibt zurück:
- 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.- Parameter:
id
- the beard ID
-
getBeard
public byte getBeard()Gets the beard of the player. Returns -1 if the player has no beard.- Gibt zurück:
- 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.- Parameter:
variation
- the new variation. Default variation is 0.
-
getVariation
public byte getVariation()Gets the variation of the skin. Only used for certain npc.- Gibt zurück:
- the variation. Default variation is 0.
-