Updated MCPing

This commit is contained in:
RaphiMC 2025-04-09 23:11:22 +02:00
parent 80c970698d
commit d472a1dacd
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
2 changed files with 2 additions and 2 deletions
build.gradle
src/main/java/net/raphimc/viaproxy/util

View file

@ -91,7 +91,7 @@ dependencies {
include "net.lenni0451.classtransform:additionalclassprovider:1.14.1"
include "net.lenni0451:Reflect:1.4.0"
include "net.lenni0451:LambdaEvents:2.4.2"
include("net.lenni0451:MCPing:1.4.3") {
include("net.lenni0451:MCPing:1.4.4") {
exclude group: "com.google.code.gson", module: "gson"
}
include "net.lenni0451.commons:swing:1.7.0"

View file

@ -31,7 +31,7 @@ public class ProtocolVersionDetector {
public static ProtocolVersion get(final SocketAddress serverAddress, final ProtocolVersion clientVersion) {
final MCPingResponse response = MCPing
.pingModern(clientVersion.getOriginalVersion())
.pingModern(clientVersion.getOriginalVersion(), true)
.tcpSocketFactory(new SocketChannelSocketFactory())
.address(AddressUtil.toJ16UnixSocketAddress(serverAddress))
.noResolve()