API WorldGuard

Discussion in 'WorldGuard' started by Darkphenixs01, Sep 19, 2018.

  1. Darkphenixs01

    Darkphenixs01 New Member

    I'm trying to see which region the player is, in previous versions it works but now in the worldguard-legacy-7.0.0-SNAPSHOT-dist the method "getRegionManager ()" is no longer functional .


    Method that works in previous versions:
    RegionManager regionManager = Main.getInstance().getWorldGuard().getRegionManager( p.getLocation().getWorld());
    ApplicableRegionSet set = regionManager.getApplicableRegions( p.getLocation() );
    LinkedList< String > regions = new LinkedList< String >();

    for ( ProtectedRegion region : set ) {

    String id = region.getId();
    regions.add( id );
    }
    String regionss = regions.getFirst() ;



    Can you help me find a way to recover the area where the player is?
    Thank you in advance.
    Last edited: Sep 19, 2018
  2. PseudoKnight

    PseudoKnight Well-Known Member Developer

  3. Darkphenixs01

    Darkphenixs01 New Member