mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-25 20:25:37 +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) {
|
private boolean isSafeFromRain(Player player) {
|
||||||
if (isEssentialsGodMode(player) || player.getWorld().getEnvironment().equals(Environment.NETHER)
|
if (isEssentialsGodMode(player) || player.getWorld().getEnvironment().equals(Environment.NETHER)
|
||||||
|
|| player.getGameMode() != GameMode.SURVIVAL
|
||||||
|| player.getWorld().getEnvironment().equals(Environment.THE_END)
|
|| player.getWorld().getEnvironment().equals(Environment.THE_END)
|
||||||
|| (addon.getSettings().isHelmetProtection() && (player.getInventory().getHelmet() != null
|
|| (addon.getSettings().isHelmetProtection() && (player.getInventory().getHelmet() != null
|
||||||
&& player.getInventory().getHelmet().getType().name().contains("HELMET")))
|
&& player.getInventory().getHelmet().getType().name().contains("HELMET")))
|
||||||
@ -264,7 +265,7 @@ public class AcidEffect implements Listener {
|
|||||||
*/
|
*/
|
||||||
boolean isSafeFromAcid(Player player) {
|
boolean isSafeFromAcid(Player player) {
|
||||||
// Check for GodMode
|
// Check for GodMode
|
||||||
if (isEssentialsGodMode(player)
|
if (isEssentialsGodMode(player) || player.getGameMode() != GameMode.SURVIVAL
|
||||||
// Protect visitors
|
// Protect visitors
|
||||||
|| (addon.getPlugin().getIWM().getIvSettings(player.getWorld()).contains(DamageCause.CUSTOM.name())
|
|| (addon.getPlugin().getIWM().getIvSettings(player.getWorld()).contains(DamageCause.CUSTOM.name())
|
||||||
&& !addon.getIslands().userIsOnIsland(player.getWorld(), User.getInstance(player)))) {
|
&& !addon.getIslands().userIsOnIsland(player.getWorld(), User.getInstance(player)))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user