use of com.github.sirblobman.combatlogx.api.expansion.region.RegionHandler in project CombatLogX by SirBlobman.
the class ListenerForceField method isSafe.
private boolean isSafe(Player player, Location location, TagType tagType) {
ICombatLogX plugin = getCombatLogX();
ExpansionManager expansionManager = plugin.getExpansionManager();
List<Expansion> enabledExpansionList = expansionManager.getEnabledExpansions();
for (Expansion expansion : enabledExpansionList) {
if (expansion instanceof RegionExpansion) {
RegionExpansion regionExpansion = (RegionExpansion) expansion;
RegionHandler regionHandler = regionExpansion.getRegionHandler();
if (regionHandler.isSafeZone(player, location, tagType)) {
return true;
}
}
}
return false;
}
Aggregations