Hiding other player's health

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

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

    I Al Istannen

  2. WrapperPlayServerEntityMetadata wrapper = new WrapperPlayServerEntityMetadata();
    Ok, what's next?
     
  3. Offline

    mcdorli

    Please, try to search for some information yourself, you're just wasting your and our time by not doing a simply googling.
     
  4. Offline

    ChipDev

    We arent going to tell you because that would be spoon feeding, you aren't doing your fair share of research inbetween asking what to do next.
     
    bennie3211 and Zombie_Striker like this.
  5. This is how far I can go, now this thread makes sense. What now?
    Code:
                        WrapperPlayServerEntityMetadata wrapper = new WrapperPlayServerEntityMetadata();
                        wrapper.sendPacket(p);
     
  6. Offline

    Zombie_Striker

    @mouz_
    Now, what you need to do is set all the data the packet neeeds before you set it. This includes the entity's ID and the metadata you want to change.
     
    ChipDev likes this.
  7. Set it to what?
     
  8. Offline

    bennie3211

    Did you even try something? You should edit the data before sending it.

    Edit: @Zombie_Striker ninja'd me
     
    ChipDev and Zombie_Striker like this.
  9. Offline

    bennie3211

    You can refresh all you want, but you won't get spoonfeeded. Try something and come back to use with what you can't get done or give error messages. @Zombie_Striker told you before what you needed to do so try that first...
     
  10. Dude, tell me objects, numbers, and I will try, because so far you didn't help me at all.
     
  11. Offline

    bennie3211

    What options do you get when you use the wrapper object? Can you edit the meta data?
     
  12. Offline

    Zombie_Striker

    @mouz_
    Use the "Packet.setEntityID( int )" method to set which entity's metadata you're updating. Replace int with the entity's ID.

    Then use Packet.setMetaData( metadata ) t0 set the entity's metadata. Replace metadata with the modified entity metadata. Note: You can use Entity.getMetaData to get all the meta tags. From there, loop through each tag and find the one that controls the entity's health.
     
    bennie3211 likes this.
  13. Code:
                        WrapperPlayServerEntityMetadata wrapper = new WrapperPlayServerEntityMetadata();
                        wrapper.setEntityID(w.getTarget(event).getEntityId());
                        wrapper.sendPacket(p);
    I don't understand this Entity.getMetaData thing, because getMetaData have string in the method.
     
  14. Offline

    I Al Istannen

    @Zombie_Striker
    I am not totally sure, but aren't that just the tags set by the Plugins? And not the ones he needs?
     
  15. @mouz_ "Refresh" (it's called 'bumping', by the way) all you want. No one is going to straight-up give you the code. Why aren't you using any of the resources the people above have given you? At least put some effort into coding. Otherwise, you can get help elsewhere.
    This is what you need to do. Go try it, come back if it doesn't work.
    Explain what you mean by this.
     
Thread Status:
Not open for further replies.

Share This Page