Record Class PlayerProfileMeta
java.lang.Object
java.lang.Record
fr.fidorial.entity.PlayerProfileMeta
- Record Components:
id- the player identityname- the player name
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerProfileMeta(PlayerProfile profile) Extracts the identity of a profile.PlayerProfileMeta(UUID id, String name) Creates an instance of aPlayerProfileMetarecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(JsonObject output) Writes this identity asuuidandnamefields.static PlayerProfileMetacreateOffline(String name) Derives the identity an offline-mode server gives to a name.final booleanIndicates whether some other object is "equal to" this one.static @Nullable PlayerProfileMetafromJson(JsonObject object) Reads an identity from a JSON object holdinguuidandname.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerProfileMeta
Extracts the identity of a profile.- Parameters:
profile- the profile- Since:
- 0.1.0
-
PlayerProfileMeta
-
-
Method Details
-
fromJson
Reads an identity from a JSON object holdinguuidandname.- Parameters:
object- the JSON object- Returns:
- the identity, or
nullif a field is missing or the uuid is malformed - Since:
- 0.1.0
-
appendTo
Writes this identity asuuidandnamefields.- Parameters:
output- the JSON object to write into- Since:
- 0.1.0
-
createOffline
Derives the identity an offline-mode server gives to a name.- Parameters:
name- the player name- Returns:
- the identity, whose uuid is derived from
OfflinePlayer:<name> - Since:
- 0.1.0
-
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). -
id
-
name
-