fill preset area with stone

Discussion in 'Plugin Development' started by ice374, Jul 28, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    How can i fill a preset region, lets say all blocks between x:10 , y:10, z:10 and x:0, y:0, z:0 with stone blocks?

    I _DONT_ want to set every block individually like this:
    player.getWorld().getBlockAt(10, 10, 10).setType(Material.STONE);
    player.getWorld().getBlockAt(9, 10, 10).setType(Material.STONE);
    ect, ect
    I almost want it to fill as a rectangle

    - Ice
  2. Offline


    Maybe you want to use loops?
    for (x = 0; x <= 10; x++)
    for (y = 0; y <= 10; y++)
    for (z = 0; z <= 10; z++)
    player.getWorld().getBlockAt(x, y, z).setType(Material.STONE);
    Codex Arcanum and etaxi341 like this.
  3. Offline

    Codex Arcanum

    I don't believe that this is something that is supported in Bukkit - you are going to have to use loops in order to set each block individually.
  4. Offline


Thread Status:
Not open for further replies.

Share This Page