Solved EntityDamageByEntityEvent...

Discussion in 'Plugin Development' started by Weetch, Aug 13, 2016.

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

    Weetch

    Hi.

    I got a problem with EntityDamageByEntityEvent. When somebody tries to attack in a non-pvp area (btw i'm using worldguard pvp flag) the event still gets called. The same happens when somebody tries to attack a player in creative mode, and there is no actual damage, but the event still gets called.

    Anybody know a solution for this?
     
    Last edited: Aug 13, 2016
  2. Offline

    Zombie_Striker

  3. Offline

    Weetch

    I tried to set EventPriority to highest, but the same thing happens.
    Shall I check if the event.isCancelled() returns true or what?

    Ok, I tried event.isCancelled()==false and now it works perfectly.
    Thank you for help.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 13, 2016
  4. Offline

    Zombie_Striker

    @Weetch
    Mark this thread as solved if your problem has been solved.
     
Thread Status:
Not open for further replies.

Share This Page