diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftOutput.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftOutput.java index 00998f81..94f6613d 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftOutput.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftOutput.java @@ -2,6 +2,7 @@ package net.md_5.bungee.protocol; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; +import java.nio.charset.Charset; import java.util.Arrays; public class MinecraftOutput @@ -47,4 +48,9 @@ public class MinecraftOutput buf.writeChar( c ); } } + + public void writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket(String s) + { + buf.writeBytes( s.getBytes( Charset.forName( "UTF-8" ) ) ); + } } diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java index 17d985e2..231893c2 100644 --- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java +++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java @@ -156,7 +156,7 @@ public class ServerConnector extends PacketHandler user.unsafe().sendPacket( modLogin ); MinecraftOutput out = new MinecraftOutput(); - out.writeString( ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" ); + out.writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket(ProxyServer.getInstance().getName() + " (" + ProxyServer.getInstance().getVersion() + ")" ); user.unsafe().sendPacket( new PacketFAPluginMessage( "MC|Brand", out.toArray() ) ); } else {