use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.
the class WorldGuardFlagChecker method doExplosionRegenFlag.
public static boolean doExplosionRegenFlag(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.getEliteMobsExplosionRegen());
}
use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.
the class WorldGuardFlagChecker method checkFlag.
public static boolean checkFlag(Location location, StateFlag stateFlag) {
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, stateFlag);
}
use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.
the class WorldGuardFlagChecker method doMobSpawnFlag.
public static boolean doMobSpawnFlag(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, Flags.MOB_SPAWNING);
}
use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.
the class WorldGuardFlagChecker method getIntegerFlagValue.
@Nullable
public static Integer getIntegerFlagValue(Location location, Flag flag) {
com.sk89q.worldedit.util.Location wgLocation = BukkitAdapter.adapt(location);
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
ApplicableRegionSet set = query.getApplicableRegions(wgLocation);
Object object = set.queryValue(null, flag);
return object == null ? null : (Integer) object;
}
use of com.sk89q.worldguard.protection.regions.RegionQuery in project EliteMobs by MagmaGuy.
the class WorldGuardFlagChecker method doEventFlag.
public static boolean doEventFlag(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.getEliteMobsEventsFlag());
}
Aggregations