From b86a33d058d37e6c5715b1ec22117ab6c3d0ca7e Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 21 Aug 2016 09:02:37 +1000 Subject: [PATCH] #1941: Fix modded client+server in some cases --- .../java/net/md_5/bungee/connection/UpstreamBridge.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java index ced91a2ec..7e1917fa2 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java @@ -89,8 +89,11 @@ public class UpstreamBridge extends PacketHandler @Override public void handle(PacketWrapper packet) throws Exception { - con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() ); - con.getServer().getCh().write( packet ); + if ( con.getServer() != null ) + { + con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() ); + con.getServer().getCh().write( packet ); + } } @Override