funkemunky

Adding blocks to load.

Apr 25th, 2020
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1.  while (iterator.hasNext()) { //Iterates through all blocks set between corners.
  2.             Block block = iterator.next();
  3.             if (block.getType() == Material.AIR || block.getType() == Material.getMaterial(175) || block.getType() == Material.getMaterial(31) || block.getType() == Material.getMaterial(38)) //Checks if block is any of these materials.
  4.                 blocksbefore.add(block.getLocation()); //Adds to blocks to be removed on method clearBlocks(boolean).
  5.  
  6.             if (kit.equalsIgnoreCase("Hikabrain")){ //Irrelevant. This is just setting the beds for Hikabrain.
  7.                 if (block.getType().equals(Material.BED_BLOCK)){
  8.                     if (bed1 == null)
  9.                         bed1 = block;
  10.                     else bed2 = block;
  11.                 }
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment