Reintroduce non-Air constraint to cannon explosion
This commit is contained in:
parent
e375db5aec
commit
4227e24ae0
@ -431,7 +431,8 @@ public class Cannon extends SiegeWeapon
|
||||
List<Block> blocks = Stream.generate(() -> UtilAlg.getRandomLocation(event.getProjectile().getLocation(), 4 * getPowerLevel()).getBlock())
|
||||
.limit(30) // Generate up to 30
|
||||
.distinct() // distinct blocks,
|
||||
.filter(block -> // filter for those unclaimed,
|
||||
.filter(block -> block.getType() != Material.AIR) // filter for non-air
|
||||
.filter(block -> // and blocks whose locations aren't blacklisted,
|
||||
{
|
||||
ClanTerritory claim = _siegeManager.getClansManager().getClanUtility().getClaim(block.getLocation());
|
||||
return claim == null || _siegeManager.getClansManager().getBlacklist().allowed(claim.Owner);
|
||||
|
Loading…
Reference in New Issue
Block a user