1.5.0 Release Canidate 4.2c

This commit is contained in:
Tyler Murphy 2022-05-26 11:57:12 -04:00
parent 15dedc90a4
commit 7e5bd64502

View file

@ -61,9 +61,11 @@ public class DamageHandler implements Listener {
event.setCancelled(true);
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.
// Also, if there was no attacker, if the damaged is not a player, ignore them.
} else if (!board.contains(player) || !pvpEnabled && !allowNaturalCauses && board.contains(player)) {
} else if (!pvpEnabled && !allowNaturalCauses && board.contains(player)) {
event.setCancelled(true);
return;
}