Hiding other player's health

Discussion in 'Plugin Development' started by mouz_, Apr 25, 2016.

Thread Status:
Not open for further replies.
  1. Hi, how to hide other player's health so they can't see it? For example cheats like nametags or mod like DamageIndicator. It just shows the enemy's health.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @mouz_ You need to change the packets for that.
     
  3. How to do it?
     
  4. Offline

    mcdorli

    Tried googling it? If you have no or only a small experience in packets, then you should use ProtocolLib
     
    ChipDev likes this.
  5. I didn't find any of helpful informations. How to do it with ProtocolLib?
     
  6. Offline

    Gonmarte

    No offense, im 100% sure that if you search it, you will find it. You cant just wait for us to get you all the information. Go to the resources, there are some packets tutorials that are really useful. Then, you can always google about it and you will find some tutorials as well and maybe some questions in another forums related to packets. Finally, you can go to youtube, there are some youtubers that have videos explaining this such as Pogostickdev29 (I advide you to stay away from youtube, but its your choice).
    If dont want learn packets, just do the same as i told you above with the protocolLib :)
     
  7. https://www.google.pl/search?q=hidi...rome..69i57.5450j0j1&sourceid=chrome&ie=UTF-8

    Yeah, I found it! lol
    Can't you just help?
     
  8. Offline

    Irantwomiles

  9. How to do it with ProtocolLib without any tasks?
     
  10. Offline

    timtower Administrator Administrator Moderator

    @mouz_ Setup a listener, listen for an entity update, change it.
     
  11. Offline

    timtower Administrator Administrator Moderator

    @mouz_ Protocollib has plenty of tutorials. Try a few, we wont spoonfeed.
     
  12. It's not spoonfeeding, I would like to know which packet can help me with this, where else can I get help about it?
     
  13. Offline

    I Al Istannen

    @mouz_
    The goto-place for packet questions is this: wiki.vg/Protocol. You will most likely find your answer there.
     
  14. Ye, this is exactly how you help people. I'm asking for the ProtocolLib.
     
  15. Offline

    timtower Administrator Administrator Moderator

    @mouz_ ProtocolLib has very similar names as that link though. Almost the same.
     
  16. Offline

    Zombie_Striker

  17. Last edited: Apr 28, 2016
  18. Offline

    Zombie_Striker

    @mouz_
    I sent the tutorial because:
    And because ProtcolLib has a enum for all the packets that are sent. You can simply check the enum for the name of the packet you're looking for by using "PacketType." and looking at all the values it has.
     
  19. Offline

    Esophose

    @mouz_
    Use the resources people have posted for you. That is enough information to do what you want.

    If you still need help, post some code of what you have already tried, otherwise we will assume you have made absolutely no effort to solve your own problem.
     
  20. I only see useless post right here, I can't do anything with it.
     
  21. Offline

    timtower Administrator Administrator Moderator

    @mouz_ What have you tried already then?
     
  22. Offline

    ImAFlo

    Packetplayoutentitymetadata -> Datawatcher

    Gesendet von meinem LG-H440n mit Tapatalk
     
  23. In packet event when using entity:
    Code:
                        try {
                            sendFakeHealth(p, (LivingEntity) w.getTarget(event));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
    Code:
        public static void sendFakeHealth(Player p, LivingEntity le) throws Exception{
            DataWatcher dw = ((CraftPlayer) le).getHandle().getDataWatcher();
            dw.watch(0, (Byte) (byte) 0x02);
            PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(le.getEntityId(), dw, true);
            ((CraftPlayer) p).getHandle().playerConnection.sendPacket(packet);
        }
    Why can't I use ProtocolLib for this?
     
  24. Offline

    timtower Administrator Administrator Moderator

    @mouz_ Nobody is saying that you cant use protocollib.
     
    ChipDev likes this.
  25. Offline

    ImAFlo

    You need to listen for the packet and *replace* the watchable object ^^

    Gesendet von meinem LG-H440n mit Tapatalk
     
  26. Just 1 person helped me with proposition not from ProtocolLib.

    So what to do now?
     
  27. Offline

    timtower Administrator Administrator Moderator

Thread Status:
Not open for further replies.

Share This Page