Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/main/java/net/raphimc/viaproxy/util/StatusPingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
import net.lenni0451.mcping.MCPing;
import net.lenni0451.mcping.pings.sockets.impl.factories.SocketChannelSocketFactory;
import net.lenni0451.mcping.responses.BedrockNethernetPingResponse;
import net.lenni0451.mcping.responses.BedrockRaknetPingResponse;
import net.lenni0451.mcping.responses.IPingResponse;
import net.lenni0451.mcping.responses.MCPingResponse;
import net.raphimc.viaproxy.ViaProxy;

import java.net.SocketAddress;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;

Expand Down Expand Up @@ -61,15 +59,6 @@ public static CompletableFuture<ProtocolVersion> detectProtocolVersion(final Soc
});
}

public static CompletableFuture<BedrockRaknetPingResponse> pingBedrockRakNet(final SocketAddress serverAddress) {
return MCPing
.pingBedrockRaknet()
.address(AddressUtil.toJ16UnixSocketAddress(serverAddress))
.noResolve()
.timeout(ViaProxy.getConfig().getConnectTimeout() / 2, ViaProxy.getConfig().getConnectTimeout() / 2)
.getAsync();
}

public static CompletableFuture<BedrockNethernetPingResponse> pingBedrockNetherNetHttp(final SocketAddress serverAddress) {
return MCPing
.pingBedrockNethernet()
Expand Down Expand Up @@ -97,9 +86,6 @@ public static MCPingResponse convertToJavaPingResponse(final IPingResponse respo
player.id = "00000000-0000-0000-0000-000000000000";
return player;
}).toArray(MCPingResponse.Players.Player[]::new);
if (response instanceof BedrockRaknetPingResponse bedrockResponse) {
javaResponse.version.name = Objects.requireNonNullElse(bedrockResponse.gameId, "") + " " + response.getVersionName();
}
return javaResponse;
}

Expand Down