Fix MC|Brand array having trailing zeroes.

This commit is contained in:
md_5 2016-07-15 23:45:38 +10:00
parent e5ac567c79
commit c43f25e23b
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ public class ServerConnector extends PacketHandler
ByteBuf brand = ByteBufAllocator.DEFAULT.heapBuffer();
DefinedPacket.writeString( bungee.getName() + " (" + bungee.getVersion() + ")", brand );
user.unsafe().sendPacket( new PluginMessage( "MC|Brand", brand.array().clone(), handshakeHandler.isServerForge() ) );
user.unsafe().sendPacket( new PluginMessage( "MC|Brand", DefinedPacket.readArray( brand ), handshakeHandler.isServerForge() ) );
brand.release();
} else
{

View File

@ -235,7 +235,7 @@ public class DownstreamBridge extends PacketHandler
brand.release();
brand = ByteBufAllocator.DEFAULT.heapBuffer();
DefinedPacket.writeString( bungee.getName() + " (" + bungee.getVersion() + ")" + " <- " + serverBrand, brand );
pluginMessage.setData( brand.array().clone() );
pluginMessage.setData( DefinedPacket.readArray( brand ) );
brand.release();
// changes in the packet are ignored so we need to send it manually
con.unsafe().sendPacket( pluginMessage );