Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. @EventHandler
  2. public void onBlockPlace(BlockPlaceEvent event)
  3. {
  4. Location origin = event.getBlock().getLocation();
  5. int radius = 5;
  6. for (int i = -radius; i < radius; i++)
  7. for (int j = -radius; j < radius; j++)
  8. for (int k = -radius; k < radius; k++)
  9. if (origin.add(i, j, k).distance(origin) <= radius)
  10. event.getBlock().getWorld().getBlockAt(origin.add(i, j, k)).setType(Material.DIRT);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement