Class ProtocolVersionDetector
java.lang.Object
com.viaversion.viafabricplus.protocoltranslator.util.ProtocolVersionDetector
This class can be used to detect the protocol version of a server without connecting to it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.viaversion.viaversion.api.protocol.version.ProtocolVersionget(net.minecraft.client.multiplayer.resolver.ServerAddress serverAddress, InetSocketAddress socketAddress, com.viaversion.viaversion.api.protocol.version.ProtocolVersion clientVersion) Detects the protocol version of a server
-
Constructor Details
-
ProtocolVersionDetector
public ProtocolVersionDetector()
-
-
Method Details
-
get
public static com.viaversion.viaversion.api.protocol.version.ProtocolVersion get(net.minecraft.client.multiplayer.resolver.ServerAddress serverAddress, InetSocketAddress socketAddress, com.viaversion.viaversion.api.protocol.version.ProtocolVersion clientVersion) throws Exception Detects the protocol version of a server- Parameters:
serverAddress- The address of the serverclientVersion- The version of the client- Returns:
- The protocol version of the server
- Throws:
Exception
-