ProtocolLib

3M Downloads

Manipulate Packets for specific players manipulate it for all

FREE2WIN2 opened this issue · 3 comments

commented

Make sure you're doing the following

  • [✓] You're using the latest build for your server version
  • [✓] This isn't an issue caused by another plugin
  • [✓] You've checked for duplicate issues
  • [✓] You didn't use /reload

Describe the question
We want to manipulate Packets fromm the server to the client to send specific blocks.

API method(s) used
code...

Expected behavior
We want that specific Player get some Blocks und blockupdates and other get the normal block(for some players we manipulate the packets and for others not...)

Code
https://pastebin.com/5MgNCrih

Additional context
We are sure that the package will only be changed by the right players (we have printed it)
Nevertheless, all players get the same packet.

commented

some packets get send to all online players.
if you want to instead send an individual one, you have to cancel the event for that player and send the packet manually.
(or clone the packet I guess?)

commented

Okay, I will try this ^^

commented

works:
I clone it an manipulate the clone..