Solved getDamager?

Discussion in 'Plugin Development' started by iClipse, Aug 15, 2016.

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

    iClipse

    So I'm working on my second plugin, and I am getting this problem: I cant get the damager.

    Im trying to make a lifesteal plugin, and all is working EXCEPT for this part, any help appreciated.
    Code:
    double count = e.getEntity().getDamager().getHealth();
    
    This is all I got, but it keeps underlining ".getDamager" and I cant get help, even after wasting my life on this website looking for a tiny bit of help
     
    Last edited by a moderator: Aug 15, 2016
  2. @iClipse
    The problem is that you get the entity of what I presume to be an event, and then try to get the damager on the Entity Object. All you need to do is remove the ".getEntity()" bit.
     
    Last edited by a moderator: Aug 15, 2016
  3. Offline

    iClipse

    Last edited by a moderator: Aug 15, 2016
Thread Status:
Not open for further replies.

Share This Page