Completely cancel the explosion falling block for claimed territories.

This commit is contained in:
Ben 2016-04-14 12:08:54 +01:00
parent a295cade1c
commit 3bf3eba005
1 changed files with 6 additions and 0 deletions

View File

@ -443,6 +443,12 @@ public class Cannon extends SiegeWeapon
while (blocks.size() < 10 && (attempts < 30))
{
Block block = UtilAlg.getRandomLocation(event.getProjectile().getLocation(), (4 * getPowerLevel())).getBlock();
if (_siegeManager.getClansManager().getClanUtility().getClaim(block.getLocation()) != null && !_siegeManager.getClansManager().getBlacklist().allowed(_siegeManager.getClansManager().getClanUtility().getClaim(block.getLocation()).Owner))
{
continue;
}
if ((block.getType() != Material.AIR) && (!blocks.contains(block)))
{
blocks.add(block);