if (all) y = i * dir;
int z = MathHelper.floor_double(sender.getPosition().getZ() / 16f);
int dim = sender.getEntityWorld().provider.getDimension();
if (y < 0 || y > 15) continue;
LandChunk chunk = new LandChunk(x, y, z, dim);
<BUG>String owner = LandManager.getInstance().getLandOwner(chunk);
</BUG>
ClaimLandEvent event = new ClaimLandEvent(new BlockPos(x, y, z), dim, player, team.teamName);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) continue;

if (all) y = i * dir;
int z = MathHelper.floor_double(sender.getPosition().getZ() / 16f);
int dim = sender.getEntityWorld().provider.getDimension();
if (y < 0 || y > 15) continue;
LandChunk chunk = new LandChunk(x, y, z, dim);
LandTeam owner = LandManager.getInstance().getLandOwner(chunk);
ClaimLandEvent event = new ClaimLandEvent(new BlockPos(x, y, z), dim, player, team.teamName);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) continue;
