Interface ViaInjector
public interface ViaInjector
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGet the name of the decoder for the netty pipeline for this platform.com.google.gson.JsonObjectgetDump()Get any relevant data for debugging injection issues.default StringGet the name of the encoder for the netty pipeline for this platform.Returns the server protocol version.default SortedSet<ProtocolVersion>Returns the supported server protocol versions.voidinject()Inject into the current Platform.default booleanReturns true if the protocol version cannot be used in the early init.voiduninject()Uninject into the current Platform.
-
Method Details
-
inject
Inject into the current Platform. May be empty on platforms not having to inject their pipeline or using alternative ways such as Mixin.- Throws:
Exception- if there is an error with injecting
-
uninject
Uninject into the current Platform. May be empty on platforms not having to inject their pipeline or using alternative ways such as Mixin.- 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 bound- 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 bound- See Also:
-
getEncoderName
Get the name of the encoder for the netty pipeline for this platform.- Returns:
- The name
-
getDecoderName
Get the name of the decoder for the 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
-