Record Class PlayerSkin
java.lang.Object
java.lang.Record
net.minestom.server.entity.PlayerSkin
Contains all the data required to store a skin.
Can be applied to a player with Player.setSkin(PlayerSkin)
or in the linked event PlayerSkinInitEvent.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPlayerSkin(String textures, String signature) Creates an instance of aPlayerSkinrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static @Nullable PlayerSkinfromUsername(String username) Gets a skin from a Minecraft username.static @Nullable PlayerSkinGets a skin from a Mojang UUID.final inthashCode()Returns a hash code value for this object.Returns the value of thesignaturerecord component.textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerSkin
-
-
Method Details
-
fromUuid
Gets a skin from a Mojang UUID.- Parameters:
uuid- Mojang UUID- Returns:
- a player skin based on the UUID, null if not found
-
fromUsername
Gets a skin from a Minecraft username.- Parameters:
username- the Minecraft username- Returns:
- a skin based on a Minecraft username, null if not found
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-