1.5.0 Release Canidate 4.2c
This commit is contained in:
parent
15dedc90a4
commit
7e5bd64502
1 changed files with 4 additions and 2 deletions
|
@ -61,9 +61,11 @@ public class DamageHandler implements Listener {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// If there was no attacker, if the damaged is not a player, ignore them.
|
||||||
|
} else if (!board.contains(player)) {
|
||||||
|
return;
|
||||||
// If there is no attacker, it most of been by natural causes. If pvp is disabled, and config doesn't allow natural causes, cancel event.
|
// If there is no attacker, it most of been by natural causes. If pvp is disabled, and config doesn't allow natural causes, cancel event.
|
||||||
// Also, if there was no attacker, if the damaged is not a player, ignore them.
|
} else if (!pvpEnabled && !allowNaturalCauses && board.contains(player)) {
|
||||||
} else if (!board.contains(player) || !pvpEnabled && !allowNaturalCauses && board.contains(player)) {
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue