Avoid some magic values and suppress warnings for the rest.

This commit is contained in:
Olof Larsson
2013-09-20 12:50:32 +02:00
parent 5a7024db4c
commit a5f4781f7b
4 changed files with 12 additions and 3 deletions

View File

@@ -56,12 +56,13 @@ public class CmdFactionsSeeChunk extends FCommand
msg("<i>Visualized %s", chunk.toString(PSFormatHumanSpace.get()));
}
@SuppressWarnings("deprecation")
public static void showPillar(Player player, World world, int blockX, int blockZ)
{
for (int blockY = 0; blockY < world.getMaxHeight(); blockY++)
{
Location loc = new Location(world, blockX, blockY, blockZ);
if (loc.getBlock().getTypeId() != 0) continue;
if (loc.getBlock().getType() != Material.AIR) continue;
int typeId = blockY % 5 == 0 ? Material.GLOWSTONE.getId() : Material.GLASS.getId();
VisualizeUtil.addLocation(player, loc, typeId);
}