Create region WG 7.0.0-SNAPSHOT

Discussion in 'WorldGuard' started by brainrtp, Jan 23, 2019.

  1. brainrtp

    brainrtp New Member

    Hello! Can you give me code, where you create a region?
    I can't create:
    Code (Text):

    BlockVector3 vector3 = BlockVector3.at(x, y, z);
    ProtectedRegion region = new ProtectedCuboidRegion("RecoveringBlock-" + egg.getId(), vector3, vector3);
    RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
    RegionManager regions = container.get(event.getClickedBlock().getLocation().getWorld()); //this error!
    regions.addRegion(region);
    region.setFlag(Flags.BLOCK_BREAK, StateFlag.State.ALLOW);
    region.setPriority(999);
     
    img: https://imgur.com/deHjCmk
    EDIT: BukkitAdapt... Okay...
    Last edited: Jan 23, 2019
  2. brainrtp

    brainrtp New Member

    Why i can't break block in child region with Flag: "break-block: allow" & priority: "999" ?????