Class GeyserInjector

java.lang.Object
org.geysermc.geyser.network.netty.GeyserInjector
Direct Known Subclasses:
GeyserBungeeInjector, GeyserSpigotInjector, GeyserVelocityInjector

public abstract class GeyserInjector extends Object
Used to inject Geyser clients directly into the server, bypassing the need to implement a complete TCP connection, by creating a local channel.
  • Field Details

    • localChannel

      protected io.netty.channel.ChannelFuture localChannel
      The local channel we can use to inject ourselves into the server without creating a TCP connection.
    • serverSocketAddress

      protected SocketAddress serverSocketAddress
      The LocalAddress to use to connect to the server without connecting over TCP.
  • Constructor Details

    • GeyserInjector

      public GeyserInjector()
  • Method Details

    • initializeLocalChannel

      public void initializeLocalChannel(GeyserBootstrap bootstrap)
      Parameters:
      bootstrap - the bootstrap of the Geyser instance.
    • initializeLocalChannel0

      protected abstract void initializeLocalChannel0(GeyserBootstrap bootstrap) throws Exception
      The method to implement that is called by initializeLocalChannel(GeyserBootstrap) wrapped around a try/catch.
      Throws:
      Exception
    • shutdown

      public void shutdown()
    • getServerSocketAddress

      public SocketAddress getServerSocketAddress()
      The LocalAddress to use to connect to the server without connecting over TCP.