#2297: Use server field on DownstreamBridge

This commit is contained in:
md_5 2017-12-01 12:23:07 +11:00
parent 4c84f37fd2
commit 1dbfcfb0b5

View File

@ -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() )
{