Class ClientPlayConnectionEvents

java.lang.Object
net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents

public final class ClientPlayConnectionEvents extends Object
Offers access to events related to the connection to a server on a logical client.
  • Field Details

    • INIT

      public static final Event<ClientPlayConnectionEvents.Init> INIT
      Event indicating a connection entered the PLAY state, ready for registering channel handlers.
      See Also:
      • invalid reference
        ClientPlayNetworking#registerReceiver(Identifier, ClientPlayNetworking.PlayChannelHandler)
    • JOIN

      public static final Event<ClientPlayConnectionEvents.Join> JOIN
      An event for notification when the client play network handler is ready to send packets to the server.

      At this stage, the network handler is ready to send packets to the server. Since the client's local state has been set up.

    • DISCONNECT

      public static final Event<ClientPlayConnectionEvents.Disconnect> DISCONNECT
      An event for the disconnection of the client play network handler.

      No packets should be sent when this event is invoked.