263 |
for (int z=(playerZ-radius); z<=(playerZ+radius); z++) { |
for (int z=(playerZ-radius); z<=(playerZ+radius); z++) { |
264 |
//int y = getGroundLevel(x,z) - 1; |
//int y = getGroundLevel(x,z) - 1; |
265 |
int y = world.getHighestBlockYAt(x, z) ; |
int y = world.getHighestBlockYAt(x, z) ; |
266 |
|
y -= 1; |
267 |
|
|
268 |
world.getBlockAt(x, y, z).setType(material); |
world.getBlockAt(x, y, z).setType(material); |
269 |
} |
} |
290 |
} |
} |
291 |
|
|
292 |
if (split.length == 2) { |
if (split.length == 2) { |
293 |
int id; |
Material material = Material.matchMaterial( split[1] ); |
294 |
try { |
if (material == null) { |
|
id = Integer.parseInt( split[1] ); |
|
|
} catch (Exception e) { |
|
295 |
player.sendMessage(label + ": id must be an integer"); |
player.sendMessage(label + ": id must be an integer"); |
296 |
return false; |
return false; |
297 |
} |
} |
298 |
if ( id == 46) { |
if ( material == Material.TNT) { |
299 |
player.sendMessage("Sorry dave, i can't do that"); |
player.sendMessage("Sorry dave, i can't do that"); |
300 |
return false; |
return false; |
301 |
} |
} |