Record Class ProfilePublicKey.Data
java.lang.Object
java.lang.Record
net.minecraft.world.entity.player.ProfilePublicKey.Data
- Enclosing class:
ProfilePublicKey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ProfilePublicKey.Data> private final InstantThe field for theexpiresAtrecord component.private final PublicKeyThe field for thekeyrecord component.private final byte[]The field for thekeySignaturerecord component.private static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.booleanbooleanhasExpired(Duration gracePeriod) final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.byte[]Returns the value of thekeySignaturerecord component.private byte[]signedPayload(UUID profileId) final StringtoString()Returns a string representation of this record class.private booleanvalidateSignature(SignatureValidator validator, UUID profileId) voidwrite(FriendlyByteBuf output)
-
Field Details
-
expiresAt
The field for theexpiresAtrecord component. -
key
The field for thekeyrecord component. -
keySignature
private final byte[] keySignatureThe field for thekeySignaturerecord component. -
MAX_KEY_SIGNATURE_SIZE
private static final int MAX_KEY_SIGNATURE_SIZE- See Also:
-
CODEC
-
-
Constructor Details
-
Data
-
Data
-
-
Method Details
-
write
-
validateSignature
-
signedPayload
-
hasExpired
public boolean hasExpired() -
hasExpired
-
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). -
toString
-
hashCode
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
keySignature
public byte[] keySignature()Returns the value of thekeySignaturerecord component.- Returns:
- the value of the
keySignaturerecord component
-