Class ClientPlayerNetworkEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
Direct Known Subclasses:
ClientPlayerNetworkEvent.Clone, ClientPlayerNetworkEvent.LoggingIn, ClientPlayerNetworkEvent.LoggingOut

public abstract class ClientPlayerNetworkEvent extends net.neoforged.bus.api.Event
Fired for different client connectivity events. See the various subclasses to listen for specific events.

These events are fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getMultiPlayerGameMode

      public MultiPlayerGameMode getMultiPlayerGameMode()
      Returns the multiplayer game mode controller for the player.
      Returns:
      the multiplayer game mode controller for the player
    • getPlayer

      public LocalPlayer getPlayer()
      Returns the player instance.
      Returns:
      the player instance
    • getConnection

      public Connection getConnection()
      Returns the network connection for the player.
      Returns:
      the network connection for the player