How to send fake packet?

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

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


    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


  3. Offline


    Attached Files:

  4. Offline



    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



    Okay, but now it has changed not only the health, but I also have food level.
  6. Offline

    timtower Administrator Administrator Moderator

    @Abcik What code did you use?
  7. Offline


    I use this:


    @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