Added WorldGuard region building overriding safezone build rules if enabled.

This commit is contained in:
flatbmx
2012-09-08 11:02:36 -05:00
parent 1751702dc1
commit 774d013cd0
4 changed files with 20 additions and 2 deletions

View File

@@ -75,7 +75,17 @@ public class Worldguard
ApplicableRegionSet set = regionManager.getApplicableRegions(pt);
return set.allows(DefaultFlag.PVP);
}
public static boolean playerCanBuild(Player player, Location loc)
{
if( ! enabled)
{
// No WG hooks so we'll always bypass this check.
return false;
}
return wg.canBuild(player, loc);
}
// Check for Regions in chunk the chunk
// Returns:
// True: Regions found within chunk