Solved WorldEdit API Problem

Discussion in 'Spigot Plugin Development' started by Serializator, May 15, 2016.

  1. Serializator

    Supporter

    At the moment I'm working with the WorldEdit API, but a problem popped up...
    There won't be any output when I run this loop, none, nada, nothing:
    Code (Text):
    for(int x = selection.getMinimumPoint().getBlockX(); x < selection.getMaximumPoint().getBlockX(); x++) {
        System.out.println(x);
       
        for(int y = selection.getMinimumPoint().getBlockY(); y < selection.getMaximumPoint().getBlockY(); y++) {
            System.out.println(y);
           
            for(int z = selection.getMinimumPoint().getBlockZ(); z < selection.getMaximumPoint().getBlockZ(); z++) {
                System.out.println(z);
            }
        }
    }
    Hopefully this is a stupid mistake that someone can point out.
     
  2. Print out the stuff prior to the loop to see what you're dealing with...?
     
    • Like Like x 1
  3. Serializator

    Supporter

    It was 4:56 AM so I was tired, the problem was that I used < instead of <= and the x axis being 0 for both the minimum and maximum point.
     
    • Like Like x 1