Interface ViaInjector
public interface ViaInjector
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Get the name of the decoder for then netty pipeline for this platform.com.google.gson.JsonObject
getDump()
Get any relevant data for debugging injection issues.default String
Get the name of the encoder for then netty pipeline for this platform.Returns the server protocol version.default SortedSet<ProtocolVersion>
Returns the supported server protocol versions.void
inject()
Inject into the current Platformdefault boolean
Returns true if the protocol version cannot be used in the early init.void
uninject()
Uninject into the current Platform
-
Method Details
-
inject
Inject into the current Platform- Throws:
Exception
- if there is an error with injecting
-
uninject
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
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
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
Get the name of the encoder for then netty pipeline for this platform.- Returns:
- The name
-
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
-