Added ping marker to servers

This commit is contained in:
Anuken
2020-08-19 17:11:37 -04:00
parent 7251fa4a03
commit 5df2a3e625
7 changed files with 25 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ public class NetworkIO{
return buffer;
}
public static Host readServerData(String hostAddress, ByteBuffer buffer){
public static Host readServerData(int ping, String hostAddress, ByteBuffer buffer){
String host = readString(buffer);
String map = readString(buffer);
int players = buffer.getInt();
@@ -100,7 +100,7 @@ public class NetworkIO{
String description = readString(buffer);
String modeName = readString(buffer);
return new Host(host, hostAddress, map, wave, players, version, vertype, gamemode, limit, description, modeName.isEmpty() ? null : modeName);
return new Host(ping, host, hostAddress, map, wave, players, version, vertype, gamemode, limit, description, modeName.isEmpty() ? null : modeName);
}
private static void writeString(ByteBuffer buffer, String string, int maxlen){