Package net.skinsrestorer.api.property
Class SkinIdentifier
java.lang.Object
net.skinsrestorer.api.property.SkinIdentifier
A skin identifier represents a reference skin that can be applied to a player.
A skin identifier always identifies a *stored* skin inside the storage.
(eg. file or database)
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
@NonNull String
@NonNull SkinType
Only used forSkinType.URL
, otherwise null.int
hashCode()
static SkinIdentifier
of
(String skinIdentifier, SkinVariant skinVariant, SkinType skinType) Not recommended to use, use the other methods instead.static SkinIdentifier
Create a new SkinIdentifier for a custom skin.static SkinIdentifier
Create a new SkinIdentifier for a player skin in the storage.static SkinIdentifier
ofURL
(String url, @Nullable SkinVariant skinVariant) Create a new SkinIdentifier for a web URL.toString()
-
Method Details
-
ofPlayer
Create a new SkinIdentifier for a player skin in the storage. A player is identified by his UUID that was assigned to them by Mojang. This is for getting a public mojang skin, not the skin of a player that is on the server. For getting the skin identifier of a player on the server, seePlayerStorage.getSkinIdOfPlayer(UUID)
.- Parameters:
uuid
- The UUID of the premium player.- Returns:
- A new SkinIdentifier.
-
ofURL
Create a new SkinIdentifier for a web URL. The url must resolve to a valid skin png file. The variant identifies a specific skin variant of the skin file. If null, the plugin will use what MineSkin determines as the default variant.- Parameters:
url
- The URL of the skin.skinVariant
- The variant of the skin.- Returns:
- A new SkinIdentifier.
-
ofCustom
Create a new SkinIdentifier for a custom skin. A custom skin can either be hardcoded into the plugin or be created by an admin. In a command, it's checked first if the skin is a custom skin, then if it's a player skin.- Parameters:
skinName
- The name of the custom skin.- Returns:
- A new SkinIdentifier.
-
of
@Internal public static SkinIdentifier of(String skinIdentifier, SkinVariant skinVariant, SkinType skinType) Not recommended to use, use the other methods instead. Only use is for storage.- Parameters:
skinIdentifier
- The identifier can be a UUID, a URL or a custom name.skinVariant
- Only used forSkinType.URL
, otherwise null.skinType
- The type of the skin.- Returns:
- A new SkinIdentifier.
-
getIdentifier
-
getSkinVariant
Only used forSkinType.URL
, otherwise null. -
getSkinType
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-