Interface LoginPacketSender

All Superinterfaces:
PacketSender

@NonExtendable public interface LoginPacketSender extends PacketSender
Represents something that supports sending packets to login channels.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.protocol.Packet<?>
    createPacket(net.minecraft.resources.Identifier channelName, net.minecraft.network.FriendlyByteBuf buf)
    Creates a packet for sending to a login channel.
    default void
    sendPacket(net.minecraft.resources.Identifier channel, net.minecraft.network.FriendlyByteBuf buf)
    Sends a packet to a channel.
    default void
    sendPacket(net.minecraft.resources.Identifier channel, net.minecraft.network.FriendlyByteBuf buf, @Nullable io.netty.channel.ChannelFutureListener callback)
    Sends a packet to a channel.
  • Method Details

    • createPacket

      net.minecraft.network.protocol.Packet<?> createPacket(net.minecraft.resources.Identifier channelName, net.minecraft.network.FriendlyByteBuf buf)
      Creates a packet for sending to a login channel.
      Parameters:
      channelName - the id of the channel
      buf - the content of the packet
      Returns:
      the created packet
    • sendPacket

      default void sendPacket(net.minecraft.resources.Identifier channel, net.minecraft.network.FriendlyByteBuf buf)
      Sends a packet to a channel.
      Parameters:
      channel - the id of the channel
      buf - the content of the packet
    • sendPacket

      default void sendPacket(net.minecraft.resources.Identifier channel, net.minecraft.network.FriendlyByteBuf buf, @Nullable io.netty.channel.ChannelFutureListener callback)
      Sends a packet to a channel.
      Parameters:
      channel - the id of the channel
      buf - the content of the packet
      callback - an optional callback to execute after the packet is sent, may be null