WorldGuard/Edit //walls

Discussion in 'Plugin Development' started by DoggyCode™, Jan 15, 2017.

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

    DoggyCode™

    I'm using WorldGuard and WorldEdit API, and I'm trying to recreate //walls.

    I have a cuboid region which I got from:
    PHP:
    ProtectedRegion spawnReg plugin.getWorldGuardManager().getSpawnRegion(Bukkit.getWorld("world"));
    CuboidRegion cuboidRegion = new CuboidRegion(spawnReg.getMinimumPoint().positive(), spawnReg.getMaximumPoint().positive());

    public 
    ProtectedRegion getSpawnRegion(World world) {
      
    WorldGuardPlugin guard plugin.getWorldGuardPlugin();
      
    RegionManager manager guard.getRegionManager(world);

      return 
    manager.getRegion("spawn".toLowerCase());
    }
    I have my cuboid region, I think, what would be the next steps?
     
  2. Online

    timtower Administrator Administrator Moderator

    @DoggyCode™
    for(z){
    for(x){
    z1.setBlock
    z2.setBlock
    }
    for(z){
    x1.setBlock
    x2.setBlock
    }
    }

    Many methods possible though.
    z1 is lower z,
    z2 upper z, etc etc
     
  3. Offline

    kameronn

    adding onto what @timtower said.'

    Get two points, so now you have 2 x points, 2 y points and 2 z points, find the perimeter using for loops and set the blocks
     
Thread Status:
Not open for further replies.

Share This Page