From 1dbfcfb0b57a04b6aa7e99bff1b6d82d047f9c4b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 1 Dec 2017 12:23:07 +1100 Subject: [PATCH] #2297: Use server field on DownstreamBridge --- .../net/md_5/bungee/connection/DownstreamBridge.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java index 6b8ae245..6b912ac7 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java @@ -223,7 +223,7 @@ public class DownstreamBridge extends PacketHandler public void handle(PluginMessage pluginMessage) throws Exception { DataInput in = pluginMessage.getStream(); - PluginMessageEvent event = new PluginMessageEvent( con.getServer(), con, pluginMessage.getTag(), pluginMessage.getData().clone() ); + PluginMessageEvent event = new PluginMessageEvent( server, con, pluginMessage.getTag(), pluginMessage.getData().clone() ); if ( bungee.getPluginManager().callEvent( event ).isCancelled() ) { @@ -297,7 +297,7 @@ public class DownstreamBridge extends PacketHandler { for ( ServerInfo server : bungee.getServers().values() ) { - if ( server != con.getServer().getInfo() ) + if ( server != this.server.getInfo() ) { server.sendData( "BungeeCord", payload ); } @@ -306,7 +306,7 @@ public class DownstreamBridge extends PacketHandler { for ( ServerInfo server : bungee.getServers().values() ) { - if ( server != con.getServer().getInfo() ) + if ( server != this.server.getInfo() ) { server.sendData( "BungeeCord", payload, false ); } @@ -442,7 +442,7 @@ public class DownstreamBridge extends PacketHandler byte[] b = out.toByteArray(); if ( b.length != 0 ) { - con.getServer().sendData( "BungeeCord", b ); + server.sendData( "BungeeCord", b ); } } @@ -475,7 +475,7 @@ public class DownstreamBridge extends PacketHandler @Override public void handle(TabCompleteResponse tabCompleteResponse) throws Exception { - TabCompleteResponseEvent tabCompleteResponseEvent = new TabCompleteResponseEvent( con.getServer(), con, tabCompleteResponse.getCommands() ); + TabCompleteResponseEvent tabCompleteResponseEvent = new TabCompleteResponseEvent( server, con, tabCompleteResponse.getCommands() ); if ( !bungee.getPluginManager().callEvent( tabCompleteResponseEvent ).isCancelled() ) {