From b6dbe82d169b2cea935f23246f0690788d384367 Mon Sep 17 00:00:00 2001 From: Myles Date: Sun, 23 Oct 2016 21:18:18 +0100 Subject: [PATCH] Fix lower version support (default to client version if we can't port it instead of server) #519 --- .../ViaVersion/bungee/handlers/BungeeEncodeHandler.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeEncodeHandler.java b/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeEncodeHandler.java index c8d795f79..c10d5f562 100644 --- a/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeEncodeHandler.java +++ b/bungee/src/main/java/us/myles/ViaVersion/bungee/handlers/BungeeEncodeHandler.java @@ -110,14 +110,16 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder { // Refresh the pipes List> protocols = ProtocolRegistry.getProtocolPath(info.getProtocolVersion(), protocolId); ProtocolPipeline pipeline = viaConnection.get(ProtocolInfo.class).getPipeline(); - viaConnection.clearStoredObjects(); pipeline.cleanPipes(); - - if (protocols != null) + if (protocols == null) { + // TODO Check Bungee Supported Protocols? *shrugs* + protocolId = info.getProtocolVersion(); + } else { for (Pair prot : protocols) { pipeline.add(prot.getValue()); } + } viaConnection.put(info); viaConnection.put(storage); @@ -138,6 +140,7 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder { } } } + private static Method getEntityMap = null; private static Method setVersion = null; private static Field entityRewrite = null;