Package org.bukkit.profile
Interface PlayerTextures
public interface PlayerTextures
Provides access to the textures stored inside a
PlayerProfile.
Modifying the textures immediately invalidates and clears any previously
present attributes that are specific to official player profiles, such as the
timestamp and signature.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different Minecraft skin models. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the textures.getCape()Gets the URL that points to the player's cape.getSkin()Gets the URL that points to the player's skin.Gets the model of the player's skin.longGets the timestamp at which the profile was last updated.booleanisEmpty()Checks if the profile stores no textures.booleanisSigned()Checks if the textures are signed and the signature is valid.voidSets the URL that points to the player's cape.voidSets the player's skin to the specified URL, and the skin model toPlayerTextures.SkinModel.CLASSIC.voidsetSkin(URL skinUrl, PlayerTextures.SkinModel skinModel) Sets the player's skin andPlayerTextures.SkinModel.
-
Method Details
-
isEmpty
boolean isEmpty()Checks if the profile stores no textures.- Returns:
trueif the profile stores no textures
-
clear
void clear()Clears the textures. -
getSkin
Gets the URL that points to the player's skin.- Returns:
- the URL of the player's skin, or
nullif not set
-
setSkin
Sets the player's skin to the specified URL, and the skin model toPlayerTextures.SkinModel.CLASSIC.The URL must point to the Minecraft texture server. Example URL:
http://textures.minecraft.net/texture/b3fbd454b599df593f57101bfca34e67d292a8861213d2202bb575da7fd091ac
- Parameters:
skinUrl- the URL of the player's skin, ornullto unset it
-
setSkin
Sets the player's skin andPlayerTextures.SkinModel.The URL must point to the Minecraft texture server. Example URL:
http://textures.minecraft.net/texture/b3fbd454b599df593f57101bfca34e67d292a8861213d2202bb575da7fd091ac
A skin model of
nullresults inPlayerTextures.SkinModel.CLASSICto be used.- Parameters:
skinUrl- the URL of the player's skin, ornullto unset itskinModel- the skin model, ignored if the skin URL isnull
-
getSkinModel
Gets the model of the player's skin.This returns
PlayerTextures.SkinModel.CLASSICif no skin is set.- Returns:
- the model of the player's skin
-
getCape
Gets the URL that points to the player's cape.- Returns:
- the URL of the player's cape, or
nullif not set
-
setCape
Sets the URL that points to the player's cape.The URL must point to the Minecraft texture server. Example URL:
http://textures.minecraft.net/texture/2340c0e03dd24a11b15a8b33c2a7e9e32abb2051b2481d0ba7defd635ca7a933
- Parameters:
capeUrl- the URL of the player's cape, ornullto unset it
-
getTimestamp
long getTimestamp()Gets the timestamp at which the profile was last updated.- Returns:
- the timestamp, or
0if unknown
-
isSigned
boolean isSigned()Checks if the textures are signed and the signature is valid.- Returns:
trueif the textures are signed and the signature is valid
-