How to send fake packet?

Discussion in 'Plugin Development' started by Abcik, Nov 17, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    Abcik

    Hello everyone!
    I need to send the player a false package that other players have 0 health. But so that they can see the players.
    I want to turn such a scam to protect the server from certain types of cheats. (In some cheats, the killaura(or other) does not work if the player has 0 hp.
    I'm just starting to master the packages, so explain how for a beginner, please.
     
  2. Offline

    Zombie_Striker

  3. Offline

    Abcik

    Attached Files:

  4. Offline

    Zombie_Striker

    @Abcik

    FakeHP.getFloats().write(0, HEALTH);

    (Note that the 0 means find the first float)

    Just remember you will also need to write the food level (an int) and the saturation (float) as well, or the packet could crash the client.
     
  5. Offline

    Abcik

    @Zombie_Striker

    Okay, but now it has changed not only the health, but I also have food level.
    upload_2018-11-18_11-9-38.png
     
  6. Online

    timtower Administrator Administrator Moderator

    @Abcik What code did you use?
     
  7. Offline

    Abcik

    I use this:

    Снимок.PNG

    @Zombie_Striker And yet, how can I still make it so that not my hearts change, but only other players and mobs? I understand that there will have to use a for loop.
     
    Last edited by a moderator: Nov 18, 2018
Thread Status:
Not open for further replies.

Share This Page