Package com.sk89q.worldguard.protection.regions

Examples of com.sk89q.worldguard.protection.regions.ProtectedRegion


        if(line.startsWith("r:")) {

            if(CraftBookPlugin.plugins.getWorldGuard() == null)
                return new SearchArea();

            ProtectedRegion reg = CraftBookPlugin.plugins.getWorldGuard().getRegionManager(block.getWorld()).getRegion(StringUtils.replace(line, "r:", ""));
            if(reg == null)
                return new SearchArea();

            return new SearchArea(reg, block.getWorld());
        } else {
View Full Code Here


        if(line.startsWith("r:")) {

            if(CraftBookPlugin.plugins.getWorldGuard() == null)
                return false;

            ProtectedRegion reg = CraftBookPlugin.plugins.getWorldGuard().getRegionManager(block.getWorld()).getRegion(StringUtils.replace(line, "r:", ""));
            return reg != null;

        } else {

            String[] locationParts = RegexUtil.EQUALS_PATTERN.split(line);
View Full Code Here

      // get region manager
      RegionManager regionManager = world!=null?SimpleSpleef.getPlugin().getWorldGuard().getRegionManager(world):null;
      // error?
      if (world == null || regionManager == null) return null;
      // get region
      ProtectedRegion region = regionManager.getRegion(conf.getString(confbase + ".worldguardRegion"));
      if (region == null) return null;
      return new CuboidWorldGuard(region, world); // create world guard cuboid - very cool!
    } else { // normal, non WorldGuard coordinates
      // now, check sane coords
      String firstWorldString = conf.getString(confbase + ".a.world");
View Full Code Here

  }
 
  @Override
  @Nullable
  public Region getRegion_i(final World world, final String name) {
    final ProtectedRegion r = plugin.getRegionManager(world).getRegion(name);
    if (r != null)
      return new WorldGuardRegion(world, r);
    return null;
  }
View Full Code Here

   
    @Override
    public void deserialize(final Fields fields) throws StreamCorruptedException, NotSerializableException {
      final String r = fields.getAndRemoveObject("region", String.class);
      fields.setFields(this);
      final ProtectedRegion region = plugin.getRegionManager(world).getRegion(r);
      if (region == null)
        throw new StreamCorruptedException("Invalid region " + r + " in world " + world);
      this.region = region;
    }
View Full Code Here

TOP

Related Classes of com.sk89q.worldguard.protection.regions.ProtectedRegion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.