mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-22 10:36:07 +01:00
Fixes #153. Switching to creative didn't stop damage that had started
This commit is contained in:
parent
7b232294ed
commit
eb1d21fee1
@ -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)))) {
|
||||
|
Loading…
Reference in New Issue
Block a user