Interface ViaInjector


public interface ViaInjector
  • Method Details

    • inject

      void inject() throws Exception
      Inject into the current Platform
      Throws:
      Exception - if there is an error with injecting
    • uninject

      void uninject() throws Exception
      Uninject into the current Platform
      Throws:
      Exception - if there is an error with uninjecting
    • lateProtocolVersionSetting

      default boolean lateProtocolVersionSetting()
      Returns true if the protocol version cannot be used in the early init. Namely, this returns true for forks of Vanilla without extra API to get the protocol version.
      Returns:
      true if the protocol version cannot be used in the early init
    • getServerProtocolVersion

      ProtocolVersion getServerProtocolVersion() throws Exception
      Returns the server protocol version. For proxies, this returns the lowest supported protocol version.
      Returns:
      server protocol version
      Throws:
      Exception - if there is an error with getting this info, e.g. not binded
      See Also:
    • getServerProtocolVersions

      default SortedSet<ProtocolVersion> getServerProtocolVersions() throws Exception
      Returns the supported server protocol versions.
      Returns:
      server protocol versions
      Throws:
      Exception - if there is an error with getting this info, e.g. not binded
      See Also:
    • getEncoderName

      default String getEncoderName()
      Get the name of the encoder for then netty pipeline for this platform.
      Returns:
      The name
    • getDecoderName

      default String getDecoderName()
      Get the name of the decoder for then netty pipeline for this platform.
      Returns:
      The name
    • getDump

      com.google.gson.JsonObject getDump()
      Get any relevant data for debugging injection issues.
      Returns:
      JSONObject containing the data