writeStringUTF8WithoutLengthHeaderBecause @Dinnerbone StuffedUpTheMCBrandPacket
This commit is contained in:
parent
55a6cc56ef
commit
47839cb11c
@ -2,6 +2,7 @@ package net.md_5.bungee.protocol;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class MinecraftOutput
|
public class MinecraftOutput
|
||||||
@ -47,4 +48,9 @@ public class MinecraftOutput
|
|||||||
buf.writeChar( c );
|
buf.writeChar( c );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writeStringUTF8WithoutLengthHeaderBecauseDinnerboneStuffedUpTheMCBrandPacket(String s)
|
||||||
|
{
|
||||||
|
buf.writeBytes( s.getBytes( Charset.forName( "UTF-8" ) ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public class ServerConnector extends PacketHandler
|
|||||||
user.unsafe().sendPacket( modLogin );
|
user.unsafe().sendPacket( modLogin );
|
||||||
|
|
||||||
MinecraftOutput out = new MinecraftOutput();
|
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() ) );
|
user.unsafe().sendPacket( new PacketFAPluginMessage( "MC|Brand", out.toArray() ) );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user