Interface ServerSidePacketRegistry

All Superinterfaces:
PacketRegistry

@Deprecated public interface ServerSidePacketRegistry extends PacketRegistry
Deprecated.
Please migrate to ServerPlayNetworking.
The server-side packet registry.

It is used for:

  • registering server-side packet receivers (client -> server packets)
  • sending packets to clients (server -> client packets).

For iterating over clients in a server, see PlayerStream.

  • Field Details

  • Method Details

    • canPlayerReceive

      boolean canPlayerReceive(PlayerEntity player, Identifier id)
      Deprecated.
      Check if a given client declared the ability to receive a given packet ID using the vanilla "register/unregister" protocol.
      Parameters:
      id - The packet identifier.
      Returns:
      True if the client side declared a given packet identifier.
    • sendToPlayer

      void sendToPlayer(PlayerEntity player, Packet<?> packet, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> completionListener)
      Deprecated.
      Send a packet to a given client.
      Parameters:
      player - The given client.
      packet - The packet to be sent.
      completionListener - Completion listener. Can be used to check for the success or failure of sending a given packet, among others.
    • sendToPlayer

      default void sendToPlayer(PlayerEntity player, Identifier id, PacketByteBuf buf, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> completionListener)
      Deprecated.
      Send an identifier/buffer-based packet to a given client.
      Parameters:
      player - The given client.
      id - The packet identifier.
      buf - The packet byte buffer.
      completionListener - Completion listener. Can be used to check for the success or failure of sending a given packet, among others.
    • sendToPlayer

      default void sendToPlayer(PlayerEntity player, Packet<?> packet)
      Deprecated.
      Send a packet to a given client.
      Parameters:
      player - The given client.
      packet - The packet to be sent.
    • sendToPlayer

      default void sendToPlayer(PlayerEntity player, Identifier id, PacketByteBuf buf)
      Deprecated.
      Send an identifier/buffer-based packet to a given client.
      Parameters:
      player - The given client.
      id - The packet identifier.
      buf - The packet byte buffer.