Prefix "BungeeCord > " to forwarded MC|Brand messages [Fixes #1038]

This commit is contained in:
Jonas Konrad 2014-06-01 14:54:46 +02:00 committed by md_5
parent 107d6b011d
commit 4dce37cd13

View File

@ -206,6 +206,15 @@ public class DownstreamBridge extends PacketHandler
throw CancelSendSignal.INSTANCE;
}
if ( pluginMessage.getTag().equals( "MC|Brand" ) )
{
String serverBrand = new String( pluginMessage.getData(), "UTF-8" );
pluginMessage.setData( ( bungee.getName() + " (" + bungee.getVersion() + ")" + " <- " + serverBrand ).getBytes( "UTF-8" ) );
// changes in the packet are ignored so we need to send it manually
con.unsafe().sendPacket( pluginMessage );
throw CancelSendSignal.INSTANCE;
}
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();