Interface PacketSender

All Known Subinterfaces:
PlayPacketSender

public interface PacketSender
Supports sending packets to channels.
  • Method Summary

    Modifier and Type Method Description
    void sendPacket​(net.minecraft.util.Identifier channel, net.minecraft.network.PacketByteBuf buf)
    Sends a packet to a channel.
    void sendPacket​(net.minecraft.util.Identifier channel, net.minecraft.network.PacketByteBuf buf, GenericFutureListener<? extends Future<? super Void>> callback)
    Sends a packet to a channel.
  • Method Details

    • sendPacket

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

      void sendPacket​(net.minecraft.util.Identifier channel, net.minecraft.network.PacketByteBuf buf, GenericFutureListener<? extends Future<? super Void>> 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