I got this before but i deleted it and now i don't remember how to do it...

is this the pm packet?

Code:
p.write(new PacketBuilder(196, Type.VARIABLE).putLong(from).putInt(lastChatId++).put((byte)p.getRights().toInteger()).put(chatText, 0, chatTextSize).toPacket());