mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 16:49:58 +01:00
Return after we cancel an event
For EntityDamageByEntity and EntityDamage
This commit is contained in:
parent
63bdc16e2f
commit
7a549ce211
@ -60,8 +60,10 @@ public class mcEntityListener implements Listener
|
||||
{
|
||||
if(!defender.getWorld().getPVP())
|
||||
return;
|
||||
if(Party.getInstance().inSameParty((Player)defender, (Player)attacker))
|
||||
if(Party.getInstance().inSameParty((Player)defender, (Player)attacker)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Make sure defender is not invincible
|
||||
@ -91,8 +93,10 @@ public class mcEntityListener implements Listener
|
||||
*/
|
||||
Player player = (Player) entity;
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(PP.getGodMode())
|
||||
if(PP.getGodMode()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!m.isInvincible(player, event))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user