From eb1d21fee1f6b32059790af40211f3821f2cd7d0 Mon Sep 17 00:00:00 2001 From: tastybento Date: Thu, 16 May 2024 21:20:55 -0700 Subject: [PATCH] Fixes #153. Switching to creative didn't stop damage that had started --- .../java/world/bentobox/acidisland/listeners/AcidEffect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/acidisland/listeners/AcidEffect.java b/src/main/java/world/bentobox/acidisland/listeners/AcidEffect.java index 5b16f65..914fcb8 100644 --- a/src/main/java/world/bentobox/acidisland/listeners/AcidEffect.java +++ b/src/main/java/world/bentobox/acidisland/listeners/AcidEffect.java @@ -234,6 +234,7 @@ public class AcidEffect implements Listener { */ private boolean isSafeFromRain(Player player) { if (isEssentialsGodMode(player) || player.getWorld().getEnvironment().equals(Environment.NETHER) + || player.getGameMode() != GameMode.SURVIVAL || player.getWorld().getEnvironment().equals(Environment.THE_END) || (addon.getSettings().isHelmetProtection() && (player.getInventory().getHelmet() != null && player.getInventory().getHelmet().getType().name().contains("HELMET"))) @@ -264,7 +265,7 @@ public class AcidEffect implements Listener { */ boolean isSafeFromAcid(Player player) { // Check for GodMode - if (isEssentialsGodMode(player) + if (isEssentialsGodMode(player) || player.getGameMode() != GameMode.SURVIVAL // Protect visitors || (addon.getPlugin().getIWM().getIvSettings(player.getWorld()).contains(DamageCause.CUSTOM.name()) && !addon.getIslands().userIsOnIsland(player.getWorld(), User.getInstance(player)))) {