From 253a0cf2a613b80180048c3d18607b91bc075bae Mon Sep 17 00:00:00 2001 From: DerFlash Date: Fri, 6 Dec 2013 08:54:48 +0100 Subject: [PATCH] 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 ;-) --- .../comphenix/integration/protocol/SimpleMinecraftClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProtocolLib/src/test/java/com/comphenix/integration/protocol/SimpleMinecraftClient.java b/ProtocolLib/src/test/java/com/comphenix/integration/protocol/SimpleMinecraftClient.java index f51aff95..e24feef1 100644 --- a/ProtocolLib/src/test/java/com/comphenix/integration/protocol/SimpleMinecraftClient.java +++ b/ProtocolLib/src/test/java/com/comphenix/integration/protocol/SimpleMinecraftClient.java @@ -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");