Class ServerPlayConnectionEvents

java.lang.Object
net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents

public final class ServerPlayConnectionEvents extends Object
Offers access to events related to the connection to a client on a logical server while a client is in game.
  • Field Details

    • INIT

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

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

      At this stage, the network handler is ready to send packets to the client.

    • DISCONNECT

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

      No packets should be sent when this event is invoked.