Fix MC|Brand array having trailing zeroes.
This commit is contained in:
parent
e5ac567c79
commit
c43f25e23b
@ -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
|
||||
{
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user