From edd2f460a072ad42a2b72c5805fcf3b788fdc248 Mon Sep 17 00:00:00 2001 From: DarkLiKally Date: Tue, 22 Feb 2011 20:56:57 +0100 Subject: [PATCH] Updated reflowing of water on sponge removal/deactivation --- .../sk89q/worldguard/bukkit/WorldGuardBlockListener.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java b/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java index c9119079..1eec4b2d 100644 --- a/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java +++ b/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java @@ -652,8 +652,11 @@ private void addSpongeWater(World world, int ox, int oy, int oz) { * @param oz */ private void setBlockToWater(World world, int ox, int oy, int oz) { - world.getBlockAt(ox, oy, oz) - .setTypeId( 8 ); + Block block = world.getBlockAt(ox, oy, oz); + int id = block.getTypeId(); + if (id == 0) { + block.setTypeId( 8 ); + } } /**