Class ClientLoginConnectionEvents

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

@Environment(CLIENT)
public final class ClientLoginConnectionEvents
extends Object
Offers access to events related to the connection to a server on the client while the server is processing the client's login request.
  • Field Details

    • INIT

      public static final Event<ClientLoginConnectionEvents.Init> INIT
      Event indicating a connection entered the LOGIN state, ready for registering query request handlers. This event may be used by mods to prepare their client side state. This event does not guarantee that a login attempt will be successful.
      See Also:
      ClientLoginNetworking.registerReceiver(Identifier, ClientLoginNetworking.LoginQueryRequestHandler)
    • QUERY_START

      public static final Event<ClientLoginConnectionEvents.QueryStart> QUERY_START
      An event for when the client has started receiving login queries. A client can only start receiving login queries when a server has sent the first login query. Vanilla servers will typically never make the client enter this login phase, but it is not a guarantee that the connected server is a vanilla server since a modded server or proxy may have no login queries to send to the client and therefore bypass the login query phase. If this event is fired then it is a sign that a server is not a vanilla server or the server is behind a proxy which is capable of handling login queries.

      This event may be used to register login query handlers which may be used to send a response to a server.

      No packets should be sent when this event is invoked.

    • DISCONNECT

      public static final Event<ClientLoginConnectionEvents.Disconnect> DISCONNECT
      An event for when the client's login process has ended due to disconnection.

      No packets should be sent when this event is invoked.