From daed15d61f4a1f46e551e26152d347136e9252b4 Mon Sep 17 00:00:00 2001 From: Mats Date: Tue, 15 Mar 2016 14:14:10 +0100 Subject: [PATCH] Make compatible with ServerListPlus custom outdated message. Fix #227 --- .../us/myles/ViaVersion/transformers/OutgoingTransformer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java index 3339d840d..417ebab0c 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java @@ -299,7 +299,8 @@ public class OutgoingTransformer { try { JSONObject json = (JSONObject) new JSONParser().parse(originalStatus); JSONObject version = (JSONObject) json.get("version"); - version.put("protocol", info.getProtocol()); + if ((long) version.get("protocol") != 9999) //Fix ServerListPlus custom outdated message + version.put("protocol", info.getProtocol()); PacketUtil.writeString(json.toJSONString(), output); } catch (ParseException e) { e.printStackTrace();