mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +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())
|
if(!defender.getWorld().getPVP())
|
||||||
return;
|
return;
|
||||||
if(Party.getInstance().inSameParty((Player)defender, (Player)attacker))
|
if(Party.getInstance().inSameParty((Player)defender, (Player)attacker)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Make sure defender is not invincible
|
//Make sure defender is not invincible
|
||||||
@ -91,8 +93,10 @@ public class mcEntityListener implements Listener
|
|||||||
*/
|
*/
|
||||||
Player player = (Player) entity;
|
Player player = (Player) entity;
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
PlayerProfile PP = Users.getProfile(player);
|
||||||
if(PP.getGodMode())
|
if(PP.getGodMode()) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!m.isInvincible(player, event))
|
if(!m.isInvincible(player, event))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user