Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final Set<Integer> blocks = Sets.newHashSet(); //pre-prepared list of the blocks in their 'combined' version.
- public void method(Player p, Region region) {
- World world = FaweAPI.getWorld(p.getWorld().getName());
- EditSession editSession = new EditSessionBuilder(world)
- .fastmode(true)
- .allowedRegionsEverywhere()
- .limitUnlimited()
- .build();
- for (Vector pt : new FastIterator(region, editSession)) { //found in the documentation.
- BaseBlock block = editSession.getBlock(pt);
- if (blocks.contains(block.getCombined())) {
- block.setCombined(0);
- }
- }
- editSession.flushQueue();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement