java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.login.serverbound.ServerboundKeyPacket
All Implemented Interfaces:
Packet, MinecraftPacket

public class ServerboundKeyPacket extends Object implements MinecraftPacket
  • Constructor Details

    • ServerboundKeyPacket

      public ServerboundKeyPacket(PublicKey publicKey, SecretKey secretKey, byte[] challenge)
    • ServerboundKeyPacket

      public ServerboundKeyPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper)
  • Method Details

    • getSecretKey

      public SecretKey getSecretKey(PrivateKey privateKey)
    • getEncryptedChallenge

      public byte[] getEncryptedChallenge(PrivateKey privateKey)
    • serialize

      public void serialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper)
      Specified by:
      serialize in interface MinecraftPacket
    • isPriority

      public boolean isPriority()
      Description copied from interface: Packet
      Gets whether the packet has handling priority. If the result is true, the packet will be handled immediately after being decoded.
      Specified by:
      isPriority in interface Packet
      Returns:
      Whether the packet has priority.
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object