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
Modifier and TypeInterfaceDescriptionstatic enum
The different Minecraft skin models. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
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.long
Gets the timestamp at which the profile was last updated.boolean
isEmpty()
Checks if the profile stores no textures.boolean
isSigned()
Checks if the textures are signed and the signature is valid.void
Sets the URL that points to the player's cape.void
Sets the player's skin to the specified URL, and the skin model toPlayerTextures.SkinModel.CLASSIC
.void
setSkin
(@Nullable URL skinUrl, @Nullable PlayerTextures.SkinModel skinModel) Sets the player's skin andPlayerTextures.SkinModel
.
-
Method Details
-
isEmpty
boolean isEmpty()Checks if the profile stores no textures.- Returns:
true
if 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
null
if 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, ornull
to unset it
-
setSkin
void setSkin(@Nullable @Nullable URL skinUrl, @Nullable @Nullable PlayerTextures.SkinModel skinModel) 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
null
results inPlayerTextures.SkinModel.CLASSIC
to be used.- Parameters:
skinUrl
- the URL of the player's skin, ornull
to unset itskinModel
- the skin model, ignored if the skin URL isnull
-
getSkinModel
Gets the model of the player's skin.This returns
PlayerTextures.SkinModel.CLASSIC
if 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
null
if 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, ornull
to unset it
-
getTimestamp
long getTimestamp()Gets the timestamp at which the profile was last updated.- Returns:
- the timestamp, or
0
if unknown
-
isSigned
boolean isSigned()Checks if the textures are signed and the signature is valid.- Returns:
true
if the textures are signed and the signature is valid
-