Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public static void write(DataOutputStream out, String group, String prefix) {
  2. ByteBuf buf = Unpooled.buffer();
  3. Util.writeVarInt(buf, 0x02); //packet id
  4. Util.writeString(buf, "Internetak);
  5.  
  6. int lenght = buf.readableBytes();
  7. byte[] packet = new byte[lenght];
  8. buf.readBytes(packet);
  9. try {
  10. Util.writeVarInt(out, lenght);
  11. out.write(packet);
  12. } catch (IOException e) {
  13. e.printStackTrace();
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement