Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void unloadLobby() {
- int delay = 0;
- for (int x = 0; x < getWidth(); x++) {
- for (int y = 0; y < schematic.getHeight(); y++) {
- for (int z = 0; z < getLength(); z++) {
- final int currentX = x;
- final int currentY = y;
- final int currentZ = z;
- new BukkitRunnable() {
- public void run() {
- Block block = new Location(origin.getWorld(), origin.getBlockX() + currentX, origin.getBlockY() + currentY,
- origin.getBlockZ() + currentZ).getBlock();
- if (block != null) {
- block.setType(Material.AIR);
- }
- }
- }.runTaskLater(SimpleGames.getInstance(), delay);
- }
- }
- delay++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment