Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int minY = -64;
- int maxY = 319;
- Bukkit.getScheduler().runTaskAsynchronously(TMProtection.PLUGIN.getPlugin(), () -> {
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- for (int y = minY; y < maxY; y++) {
- Block currentBlock = chunk.getBlock(x, y, z);
- if(currentBlock.getType().equals(Material.AIR)) continue;
- if (chunk.containsKey(currentBlock.getType().name()))
- chunk.put(currentBlock.getType().name(), chunk.get(currentBlock.getType().name()) + 1);
- else chunk.put(currentBlock.getType().name(), 1);
- }
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement