Class ConnectionStartEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.network.ConnectionStartEvent

public class ConnectionStartEvent extends net.minecraftforge.eventbus.api.Event
Fired when a network connection is started, either on the server when it receives the ClientIntentionPacket or on the client when the channel is first activated. This is intended to allow modders to attach things to the channel that can be used in the future. As this is a blocking event modders can also do things like load data. Need some example uses.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Connection
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • connection

      private final Connection connection
  • Constructor Details

    • ConnectionStartEvent

      @Internal public ConnectionStartEvent(Connection connection)
  • Method Details

    • getConnection

      public Connection getConnection()
    • isClient

      public boolean isClient()