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 Link icon

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

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
     
    boolean
     

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

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

    Methods inherited from class java.lang.Object Link icon

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

    • connection Link icon

      private final Connection connection
  • Constructor Details Link icon

    • ConnectionStartEvent Link icon

      @Internal public ConnectionStartEvent(Connection connection)
  • Method Details Link icon

    • getConnection Link icon

      public Connection getConnection()
    • isClient Link icon

      public boolean isClient()