Added quick access to the build flag.

This commit is contained in:
Brianna 2021-02-25 11:46:47 -06:00
parent d77d723dc6
commit 2435d70236

View File

@ -91,6 +91,16 @@ public class WorldGuardHook {
return canHook && Objects.equals(WorldGuardFlagHandler.getBooleanFlag(loc, "block-break"), Boolean.TRUE);
}
/**
* Check to see if the build flag is set and is set to ALLOW
*
* @param loc Location to check
* @return false if the build flag is not set for this region, or is set to DENY
*/
public static boolean isBuildAllowed(@NotNull Location loc) {
return canHook && Objects.equals(WorldGuardFlagHandler.getBooleanFlag(loc, "build"), Boolean.TRUE);
}
/**
* Check to see if the use flag is set and is set to ALLOW
*