mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
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;
|
||||
}
|
||||
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user