Using a region without getting it by location.

Discussion in 'Programming Help' started by kugick, Nov 8, 2015.

  1. kugick

    kugick New Member

    Everything seem to be in the tittle. I know how to get a region or a list of region by a location, but I want to use a region by a name that I have. To be a bit more clear how if I already have a string who is the name of a region, use it to add a member to this region.

    What's going on in-game:
    - /claim addmember <regionName> <player>

    - Get the region (looking for this)

    - add player to the region as a member using the Profile Service for uuid...

  2. wizjany

    wizjany Administrator Developer

  3. kugick

    kugick New Member

    RegionManager manager = checkRegionManager(plugin, world);
    ProtectedRegion region = checkExistingRegion(manager, id, true);

    How can I use these two methods using the api? I want to be able to use region with a getId to add a new member to a zone.
    Last edited: Nov 8, 2015
  4. wizjany

    wizjany Administrator Developer