How can I fill a large area of blocks

Discussion in 'Plugin Development' started by darthvader1925, May 3, 2021 at 10:45 AM.

  1. Offline


    I am trying to fill an area with air, then replace it back to stone after a bit. Like a door. I figure there is a way to loop through the area in the whole area but I'm not sure. How can I do that or is there another way?
  2. Offline


  3. Offline


    1. Have parameters, like a double set of coordinates that represent the to and from;
    2. In your code, loop through each location within your range;
    3. For each location, create a Location(world, x, y, z) and use Location#getBlock to get the block;
    4. Set it to air or stone or whatever;
    5. Schedule a delayed task and repeat above steps to set it back to he desired block type;
  4. Offline


    Ok, I'll test it out later

Share This Page