So basically I need help with sending packets to the server from the client. I want to make a spoofer that will trick the server that they are on a legit version of there minecraft client when in fact you are on my client. I found out they check whether the player is on their client by using packets, I narrowed this down and found the packet they use for this. I basically need to send a packet back to the server when they ask for it.
Theres no bugs with the following code, just need a way to send the packet back to server without it saying "kicked for unregistered packet"
@EventTarget
public void onReceivePacket(final PreReceivePacketEvent e) {
suffix = " §7Spoofer";
if ((e.getPacket() instanceof S08PacketPlayerPosLook)) {
StringUtils.addChatMessage("Packet Recieved", true);
}
}