1.5.0 Release Canidate 4.2b

This commit is contained in:
Tyler Murphy 2022-05-26 09:57:21 -04:00
parent 23401507e4
commit 15dedc90a4

View file

@ -61,12 +61,13 @@ public class DamageHandler implements Listener {
event.setCancelled(true);
return;
}
// If there is no attacker, it must of been by natural causes. If pvp is disabled, and config doesn't allow natural causes, cancel event.
} else if (!pvpEnabled && !allowNaturalCauses && board.contains(player)) {
// 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)) {
event.setCancelled(true);
return;
}
// Spectators cannot take damage
// Spectators and cannot take damage
if (board.isSpectator(player)) {
event.setCancelled(true);
if (Main.getInstance().supports(18) && player.getLocation().getBlockY() < -64) {