Package de.marcely.bedwars.tools
Class Skin
java.lang.Object
de.marcely.bedwars.tools.Skin
Contains the data of a player skin.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the skin signature.Returns the skin texture JSON-URL in base64.@Nullable URLTries to decode the texture and returns its included URL.booleanReturns whether the texture is a valid URL.static SkinCreates a new skin instance.static SkinCreates a new skin instance.
-
Field Details
-
STEVE
The default skin (Steve).Has no texture or signature, resulting in the default skin.
-
-
Method Details
-
getTexture
Returns the skin texture JSON-URL in base64.- Returns:
- The skin texture JSON-URL in base64
-
getTextureURL
Tries to decode the texture and returns its included URL.Attempts to cache the result after the first call.
- Returns:
- The skin texture URL, or
nullif the texture is invalid - See Also:
-
isTextureValid
public boolean isTextureValid()Returns whether the texture is a valid URL.Attempts to cache the result after the first call.
- Returns:
trueif the texture is a valid URL
-
getSignature
Returns the skin signature.- Returns:
- The skin signaturese64
-
of
Creates a new skin instance.The values don't have to be valid here, any input is accepted.
- Parameters:
texture- The texture, preferably a JSON-URL in base64signature- The signature in base64- Returns:
- The skin instance
-
of
Creates a new skin instance.- Parameters:
url- The skin texture URLsignature- The signature in base64- Returns:
- The skin instance
-