How to send Packet

How about sending a package in the subject? On the Minecraft version 1.12.2

Can you give us some context? What do you want to do with the packet? Why do you want to send a packet?

Przechwytywanie I would like to do it in such but that it does not work on 1.12.2

Are you trying to run this on the client or on the server?

You didn’t answer the question “why?”

1 Like

the client. The method shown in the picture above does not work

Most times you don’t want to use individual packets. You can approach the problem better if you use something already in the API.

Let me make this clearer:
We’re asking “why do you want to send packets” because usually there’s a particular operation that you want to perform by the server or client reacting to said packet. For example, if you wanted to play a particle packet, Sponge already has an API for doing such, so you don’t need to write packets to send client particles. Or, if you wanted to send custom blocks to the client, we have some API for that too. Our question and persistence to find out why is because you’re asking “how do I send a packet like the picture above” is sounding like an x y problem. What are you trying to achieve if we tell you how you can send packets to the client/server?

1 Like

I make a client for my server, and I am trying to send the C03PacketPlayer (AntiFall) packet. This is a server for cheater so that they do not bother other players on other servers.Sorry for my english