diff --git a/src/main/java/pw/kaboom/extras/Events.java b/src/main/java/pw/kaboom/extras/Events.java index d0bf182..48cf590 100644 --- a/src/main/java/pw/kaboom/extras/Events.java +++ b/src/main/java/pw/kaboom/extras/Events.java @@ -211,6 +211,17 @@ class Events implements Listener { } } else if (block.getType() == Material.SOIL) { event.setCancelled(true); + } else if (block.getType() == Material.STATIONARY_WATER || + block.getType() == Material.STATIONARY_LAVA) { + if (block.getRelative(BlockFace.UP).getType() == block.getType()) { + if (block.getRelative(BlockFace.DOWN).getType() != Material.AIR && + block.getRelative(BlockFace.NORTH).getType() != Material.AIR && + block.getRelative(BlockFace.SOUTH).getType() != Material.AIR && + block.getRelative(BlockFace.WEST).getType() != Material.AIR && + block.getRelative(BlockFace.EAST).getType() != Material.AIR) { + event.setCancelled(true); + } + } } else if (main.nonSolidWallMountedBlockList.contains(block.getType())) { World world = event.getBlock().getWorld(); int radius = 5; diff --git a/src/main/java/pw/kaboom/extras/Main.java b/src/main/java/pw/kaboom/extras/Main.java index f1520ed..a5ac0ce 100644 --- a/src/main/java/pw/kaboom/extras/Main.java +++ b/src/main/java/pw/kaboom/extras/Main.java @@ -19,6 +19,8 @@ import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.Material; +import org.bukkit.block.BlockFace; + import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin;