use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager 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;
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class GlowingExpansion method onEnable.
@Override
public void onEnable() {
Logger logger = getLogger();
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
int minorVersion = VersionUtility.getMinorVersion();
if (minorVersion < 9) {
logger.warning("This expansion is made for 1.9+");
expansionManager.disableExpansion(this);
return;
}
new ListenerGlow(this).register();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class LootProtectionExpansion method onEnable.
@Override
public void onEnable() {
int minorVersion = VersionUtility.getMinorVersion();
if (minorVersion < 16) {
Logger logger = getLogger();
logger.info("The loot protection expansion requires Spigot 1.16.5 or higher.");
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerLootProtection(this).register();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class DisguiseExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("iDisguise", true, "5.8")) {
ExpansionManager expansionManager = getPlugin().getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerDisguise(this).register();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class uSkyBlockExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("uSkyBlock", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListeneruSkyBlock(this).register();
}
Aggregations