Stay backwards compatible to Java 6 (getHostString() is available but protected in Java 6)

We could still use this function with Java 6 using reflection, but that would be overkill for tests only ;-)
This commit is contained in:
DerFlash 2013-12-06 08:54:48 +01:00
parent 92c8f21d5e
commit 253a0cf2a6

View File

@ -70,7 +70,7 @@ public class SimpleMinecraftClient {
// For 1.6
if (version.compareTo(new MinecraftVersion(PLUGIN_MESSAGE_VERSION)) >= 0) {
DataOutputStream data = new DataOutputStream(output);
String host = address.getHostString();
String host = address.getHostName();
data.writeByte(0xFA);
writeString(data, "MC|PingHost");