Record Class EncryptionRequestPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.login.EncryptionRequestPacket
- All Implemented Interfaces:
SendablePacket, ServerPacket, ServerPacket.Login
public record EncryptionRequestPacket(String serverId, byte[] publicKey, byte[] verifyToken, boolean shouldAuthenticate)
extends Record
implements ServerPacket.Login
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEncryptionRequestPacket(String serverId, byte[] publicKey, byte[] verifyToken, boolean shouldAuthenticate) Creates an instance of aEncryptionRequestPacketrecord 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.byte[]Returns the value of thepublicKeyrecord component.serverId()Returns the value of theserverIdrecord component.booleanReturns the value of theshouldAuthenticaterecord component.final StringtoString()Returns a string representation of this record class.byte[]Returns the value of theverifyTokenrecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
EncryptionRequestPacket
public EncryptionRequestPacket(String serverId, byte[] publicKey, byte[] verifyToken, boolean shouldAuthenticate) Creates an instance of aEncryptionRequestPacketrecord class.- Parameters:
serverId- the value for theserverIdrecord componentpublicKey- the value for thepublicKeyrecord componentverifyToken- the value for theverifyTokenrecord componentshouldAuthenticate- the value for theshouldAuthenticaterecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
serverId
Returns the value of theserverIdrecord component.- Returns:
- the value of the
serverIdrecord component
-
publicKey
public byte[] publicKey()Returns the value of thepublicKeyrecord component.- Returns:
- the value of the
publicKeyrecord component
-
verifyToken
public byte[] verifyToken()Returns the value of theverifyTokenrecord component.- Returns:
- the value of the
verifyTokenrecord component
-
shouldAuthenticate
public boolean shouldAuthenticate()Returns the value of theshouldAuthenticaterecord component.- Returns:
- the value of the
shouldAuthenticaterecord component
-