mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add setting for manually choosing MC version
- User can manually provide server version in config file - Server is not pinged if a minecraft version was manually provided - If the provided version isn't recognized, ping is re-enabled
This commit is contained in:
parent
f0b071ddea
commit
8b5ce567a6
5 changed files with 97 additions and 35 deletions
|
|
@ -647,10 +647,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
return packet_data;
|
||||
}
|
||||
|
||||
public static bool doPing(string host, int port, ref int protocolversion, ref string version)
|
||||
public static bool doPing(string host, int port, ref int protocolversion)
|
||||
{
|
||||
try
|
||||
{
|
||||
string version = "";
|
||||
TcpClient tcp = ProxyHandler.newTcpClient(host, port);
|
||||
tcp.ReceiveTimeout = 5000; //MC 1.7.2+ SpigotMC servers won't answer, so we need a reasonable timeout.
|
||||
byte[] ping = new byte[2] { 0xfe, 0x01 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue