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 23d4f256..0e5699c2 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 @@ -80,14 +80,17 @@ public class UpstreamBridge extends PacketHandler } } + @Override + public boolean shouldHandle(PacketWrapper packet) throws Exception + { + return con.getServer() != null; + } + @Override public void handle(PacketWrapper packet) throws Exception { con.getEntityRewrite().rewriteServerbound( packet.buf, con.getClientEntityId(), con.getServerEntityId() ); - if ( con.getServer() != null ) - { - con.getServer().getCh().write( packet ); - } + con.getServer().getCh().write( packet ); } @Override