Package net.minecraft.network.encryption
Record Class PlayerKeyPair
java.lang.Object
java.lang.Record
net.minecraft.network.encryption.PlayerKeyPair
- Record Components:
privateKey-publicKey-refreshedAfter- the time when the keys must be refreshed, otherwise known as expiry time
public record PlayerKeyPair(PrivateKey privateKey, PlayerPublicKey publicKey, Instant refreshedAfter)
extends Record
An RSA key pair for a player.
Users cannot generate the keys themselves; this must be provided from Mojang's authentication server.
- See Also:
- Mappings:
Namespace Name named net/minecraft/network/encryption/PlayerKeyPairintermediary net/minecraft/class_7427official cmznamed privateKeyintermediary comp_741official bnamed publicKeyintermediary comp_742official cnamed refreshedAfterintermediary comp_743official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlayerKeyPair> private final PrivateKeyThe field for theprivateKeyrecord component.private final PlayerPublicKeyThe field for thepublicKeyrecord component.private final InstantThe field for therefreshedAfterrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerKeyPair(PrivateKey privateKey, PlayerPublicKey playerPublicKey, Instant instant) -
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.booleanReturns whether the keys are expired and can no longer be used.Returns the value of theprivateKeyrecord component.Returns the value of thepublicKeyrecord component.Returns the value of therefreshedAfterrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
privateKey
The field for theprivateKeyrecord component. -
publicKey
The field for thepublicKeyrecord component. -
refreshedAfter
The field for therefreshedAfterrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/encryption/PlayerKeyPair;CODEC:Lcom/mojang/serialization/Codec;intermediary field_39049Lnet/minecraft/class_7427;field_39049:Lcom/mojang/serialization/Codec;official aLcmz;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
PlayerKeyPair
-
-
Method Details
-
isExpired
public boolean isExpired()Returns whether the keys are expired and can no longer be used.- Returns:
- whether the keys are expired and can no longer be used
- Mappings:
Namespace Name Mixin selector named isExpiredLnet/minecraft/network/encryption/PlayerKeyPair;isExpired()Zintermediary method_43546Lnet/minecraft/class_7427;method_43546()Zofficial aLcmz;a()Z
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-
publicKey
Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
refreshedAfter
Returns the value of therefreshedAfterrecord component.- Returns:
- the value of the
refreshedAfterrecord component
-