Search in sources :

Example 6 with RegionQuery

use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.

the class WorldGuardFlagChecker method doEliteMobsSpawnFlag.

public static boolean doEliteMobsSpawnFlag(Location location) {
    com.sk89q.worldedit.util.Location wgLocation = BukkitAdapter.adapt(location);
    RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
    RegionQuery query = container.createQuery();
    ApplicableRegionSet set = query.getApplicableRegions(wgLocation);
    return set.testState(null, WorldGuardCompatibility.getEliteMobsSpawnFlag());
}
Also used : RegionContainer(com.sk89q.worldguard.protection.regions.RegionContainer) RegionQuery(com.sk89q.worldguard.protection.regions.RegionQuery) ApplicableRegionSet(com.sk89q.worldguard.protection.ApplicableRegionSet)

Aggregations

ApplicableRegionSet (com.sk89q.worldguard.protection.ApplicableRegionSet)6 RegionContainer (com.sk89q.worldguard.protection.regions.RegionContainer)6 RegionQuery (com.sk89q.worldguard.protection.regions.RegionQuery)6 Nullable (javax.annotation.Nullable)1