mrkirby153

Untitled

Mar 13th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. public void unloadLobby() {
  2. int delay = 0;
  3. for (int x = 0; x < getWidth(); x++) {
  4. for (int y = 0; y < schematic.getHeight(); y++) {
  5. for (int z = 0; z < getLength(); z++) {
  6. final int currentX = x;
  7. final int currentY = y;
  8. final int currentZ = z;
  9. new BukkitRunnable() {
  10. public void run() {
  11. Block block = new Location(origin.getWorld(), origin.getBlockX() + currentX, origin.getBlockY() + currentY,
  12. origin.getBlockZ() + currentZ).getBlock();
  13. if (block != null) {
  14. block.setType(Material.AIR);
  15. }
  16. }
  17. }.runTaskLater(SimpleGames.getInstance(), delay);
  18. }
  19. }
  20. delay++;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment