Interface ViaInjector


  • public interface ViaInjector
    • Method Detail

      • inject

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

        void uninject()
               throws java.lang.Exception
        Uninject into the current Platform
        Throws:
        java.lang.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

        int getServerProtocolVersion()
                              throws java.lang.Exception
        Returns the server protocol version. For proxies, this returns the lowest supported protocol version.
        Returns:
        server protocol version
        Throws:
        java.lang.Exception - if there is an error with getting this info, eg. not binded
        See Also:
        ViaPlatform.isProxy()
      • getServerProtocolVersions

        default it.unimi.dsi.fastutil.ints.IntSortedSet getServerProtocolVersions()
                                                                           throws java.lang.Exception
        Returns the supported server protocol versions.
        Returns:
        server protocol versions
        Throws:
        java.lang.Exception - if there is an error with getting this info, eg. not binded
        See Also:
        ViaPlatform.isProxy()
      • getEncoderName

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

        java.lang.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