Module net.minestom.server
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 net.minestom.server.network.packet.server.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 aEncryptionRequestPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.byte[]
Returns the value of thepublicKey
record component.serverId()
Returns the value of theserverId
record component.boolean
Returns the value of theshouldAuthenticate
record component.final String
toString()
Returns a string representation of this record class.byte[]
Returns the value of theverifyToken
record component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
EncryptionRequestPacket
public EncryptionRequestPacket(String serverId, byte[] publicKey, byte[] verifyToken, boolean shouldAuthenticate) Creates an instance of aEncryptionRequestPacket
record class.- Parameters:
serverId
- the value for theserverId
record componentpublicKey
- the value for thepublicKey
record componentverifyToken
- the value for theverifyToken
record componentshouldAuthenticate
- the value for theshouldAuthenticate
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
serverId
Returns the value of theserverId
record component.- Returns:
- the value of the
serverId
record component
-
publicKey
public byte[] publicKey()Returns the value of thepublicKey
record component.- Returns:
- the value of the
publicKey
record component
-
verifyToken
public byte[] verifyToken()Returns the value of theverifyToken
record component.- Returns:
- the value of the
verifyToken
record component
-
shouldAuthenticate
public boolean shouldAuthenticate()Returns the value of theshouldAuthenticate
record component.- Returns:
- the value of the
shouldAuthenticate
record component
-