Record Class PlayerProfile
java.lang.Object
java.lang.Record
fr.fidorial.entity.PlayerProfile
- Record Components:
uuid- the player identityname- the player nameproperties- the profile properties, usually the signedtextures
- All Implemented Interfaces:
ObjectContentsLike, PlayerHeadObjectContents.SkinSource
public record PlayerProfile(UUID uuid, String name, List<PlayerProfile.Property> properties)
extends Record
implements PlayerHeadObjectContents.SkinSource, ObjectContentsLike
The identity of a player, with the signed properties carrying their skin.
Usable as the skin source of a player head component.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA profile property, such as thetexturesone carrying the skin. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a profile without properties from a cached identity.PlayerProfile(UUID uuid, String name) Creates a profile without properties, hence without skin.PlayerProfile(UUID uuid, String name, List<PlayerProfile.Property> properties) Copies the properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
PlayerProfile
Copies the properties. -
PlayerProfile
-
PlayerProfile
Creates a profile without properties from a cached identity.- Parameters:
meta- the cached identity- Since:
- 0.1.0
-
-
Method Details
-
applySkinToPlayerHeadContents
- Specified by:
applySkinToPlayerHeadContentsin interfacePlayerHeadObjectContents.SkinSource
-
asObjectContents
- Specified by:
asObjectContentsin interfaceObjectContentsLike- Specified by:
asObjectContentsin interfacePlayerHeadObjectContents.SkinSource
-
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). -
uuid
-
name
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-