Prefix "BungeeCord > " to forwarded MC|Brand messages [Fixes #1038]
This commit is contained in:
parent
107d6b011d
commit
4dce37cd13
@ -206,6 +206,15 @@ public class DownstreamBridge extends PacketHandler
|
|||||||
throw CancelSendSignal.INSTANCE;
|
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" ) )
|
if ( pluginMessage.getTag().equals( "BungeeCord" ) )
|
||||||
{
|
{
|
||||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||||
|
Loading…
Reference in New Issue
Block a user