Advertisement
Guest User

LOL FGTS

a guest
Mar 1st, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. public void removeLava(Player player, Location location) {
  2. final int RADIUS = 2;
  3. Location top = location.clone().add(RADIUS, RADIUS, RADIUS);
  4. Location bottom = location.clone().subtract(RADIUS, RADIUS, RADIUS);
  5. for (int x = bottom.getBlockX(); x <= top.getBlockX(); x++) {
  6. for (int y = bottom.getBlockY(); y <= top.getBlockY(); y++) {
  7. for (int z = bottom.getBlockZ(); z <= top.getBlockZ(); z++) {
  8. Block block = location.getWorld().getBlockAt(x, y, z);
  9. if (block != null && (block.getType() == Material.LAVA || block.getType() == Material.STATIONARY_LAVA)) {
  10. if (canRemoveLava(player, block.getLocation())) {
  11. block.setType(Material.AIR);
  12. }
  13. }
  14. }
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement