Package com.sk89q.worldguard.protection.managers

Examples of com.sk89q.worldguard.protection.managers.RegionManager


    // do we have a world guard region here?
    if (conf.getString(confbase + ".worldguardRegion") != null && conf.getString(confbase + ".worldguardWorld") != null && SimpleSpleef.getPlugin().getWorldGuard() != null) {
      // get world guard region
      World world = SimpleSpleef.getPlugin().getServer().getWorld(conf.getString(confbase + ".worldguardWorld"));
      // 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


        Block block = event.getBlock();
        Player player = event.getPlayer();

        Vector blockPos = BukkitUtil.toVector(block);
        RegionManager manager = worldGuard.getRegionManager(block.getWorld());
        ApplicableRegionSet set = manager.getApplicableRegions(blockPos);

        LocalPlayer localPlayer = worldGuard.wrapPlayer(player);

        if (!canAccess(localPlayer, block, set)) {
            event.setResult(Event.Result.DENY);
View Full Code Here

TOP

Related Classes of com.sk89q.worldguard.protection.managers.RegionManager

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.