diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/cakewars/trackers/FloorIsLavaTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/cakewars/trackers/FloorIsLavaTracker.java index bcfdb5719..a98f3945c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/cakewars/trackers/FloorIsLavaTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/cakewars/trackers/FloorIsLavaTracker.java @@ -7,10 +7,10 @@ import java.util.concurrent.TimeUnit; import org.bukkit.Location; import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilTime; import mineplex.core.updater.UpdateType; @@ -69,8 +69,18 @@ public class FloorIsLavaTracker extends StatTracker Location location = player.getLocation(); Block block = location.getBlock(); Set blocks = getGame().getCakePlayerModule().getPlacedBlocks(); + boolean surrounding = false; - return !blocks.contains(block) && !blocks.contains(block.getRelative(BlockFace.DOWN)) && UtilEnt.isGrounded(player) && !getGame().getCakeShopModule().isNearShop(location); + for (Block nearby : UtilBlock.getSurrounding(block, true)) + { + if (blocks.contains(nearby)) + { + surrounding = true; + break; + } + } + + return !blocks.contains(block) && !surrounding && UtilEnt.onBlock(player) && !getGame().getCakeShopModule().isNearShop(location); }); } }