Package com.sk89q.worldguard.protection

Examples of com.sk89q.worldguard.protection.ApplicableRegionSet


        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


        this.worldGuard = plugin;
    }

    @EventHandler
    public void canBuild(BuildPermissionEvent event) {
        ApplicableRegionSet regions = getApplicableRegions(event.getSign().getBlock().getLocation());

        if (Properties.WORLDGUARD_USE_FLAG) {
            event.allow(regions.allows(DefaultFlag.ENABLE_SHOP));
        } else {
            event.allow(regions.size() != 0);
        }
    }
View Full Code Here

TOP

Related Classes of com.sk89q.worldguard.protection.ApplicableRegionSet

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.