Automatic water cleanup for deleted claims in...

Automatic water cleanup for deleted claims in creative mode worlds.  Was
previously lava only.
This commit is contained in:
ryanhamshire 2015-09-14 20:12:36 -07:00
parent 2182216499
commit 287fe3e8dc

View File

@ -141,7 +141,7 @@ public class Claim
Block block = lesser.getWorld().getBlockAt(x, y, z); Block block = lesser.getWorld().getBlockAt(x, y, z);
if(exclusionClaim != null && exclusionClaim.contains(block.getLocation(), true, false)) continue; if(exclusionClaim != null && exclusionClaim.contains(block.getLocation(), true, false)) continue;
if(block.getType() == Material.STATIONARY_LAVA || block.getType() == Material.LAVA) if(block.getType() == Material.STATIONARY_LAVA || block.getType() == Material.WATER || block.getType() == Material.STATIONARY_WATER || block.getType() == Material.LAVA)
{ {
block.setType(Material.AIR); block.setType(Material.AIR);
} }
@ -174,7 +174,7 @@ public class Claim
//dodge the exclusion claim //dodge the exclusion claim
Block block = lesser.getWorld().getBlockAt(x, y, z); Block block = lesser.getWorld().getBlockAt(x, y, z);
if(block.getType() == Material.STATIONARY_LAVA || block.getType() == Material.LAVA) if(block.getType() == Material.STATIONARY_LAVA || block.getType() == Material.WATER || block.getType() == Material.STATIONARY_WATER || block.getType() == Material.LAVA)
{ {
return true; return true;
} }