Record Class PlayerLocale
java.lang.Object
java.lang.Record
dev.ua.theroer.magicutils.platform.PlayerLocale
- Record Components:
playerId- stable player id when availableplayerName- current player display/login namelocaleTag- client locale tag reported by the platform
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerLocale(UUID playerId, String playerName, String localeTag) Creates an instance of aPlayerLocalerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValid()Returns true when the payload contains enough data to process safely.Returns the value of thelocaleTagrecord component.playerId()Returns the value of theplayerIdrecord component.Returns the value of theplayerNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerLocale
Creates an instance of aPlayerLocalerecord class.- Parameters:
playerId- the value for theplayerIdrecord componentplayerName- the value for theplayerNamerecord componentlocaleTag- the value for thelocaleTagrecord component
-
-
Method Details
-
isValid
public boolean isValid()Returns true when the payload contains enough data to process safely.- Returns:
- true for non-empty player name and locale tag
-
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). -
playerId
-
playerName
Returns the value of theplayerNamerecord component.- Returns:
- the value of the
playerNamerecord component
-
localeTag
-