use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class ListenerLands method getNewbieHelperExpansion.
private NewbieHelperExpansion getNewbieHelperExpansion() {
ICombatLogX combatLogX = getCombatLogX();
ExpansionManager expansionManager = combatLogX.getExpansionManager();
Optional<Expansion> optionalExpansion = expansionManager.getExpansion("NewbieHelper");
if (!optionalExpansion.isPresent()) {
throw new IllegalArgumentException("NewbieHelper expansion is missing.");
}
Expansion expansion = optionalExpansion.get();
if (!(expansion instanceof NewbieHelperExpansion)) {
throw new IllegalArgumentException("NewbieHelper expansion is not a proper instance.");
}
return (NewbieHelperExpansion) expansion;
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class LibsDisguisesExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("LibsDisguises", true, "10")) {
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 HookMVdWPlaceholderAPI method getNewbieHelper.
private Expansion getNewbieHelper() {
ICombatLogX plugin = this.expansion.getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
Optional<Expansion> optionalExpansion = expansionManager.getExpansion("NewbieHelper");
if (optionalExpansion.isPresent()) {
Expansion expansion = optionalExpansion.get();
State state = expansion.getState();
if (state == State.ENABLED)
return expansion;
}
return null;
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class MVdWPlaceholderAPIExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("MVdWPlaceholderAPI", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
HookMVdWPlaceholderAPI hook = new HookMVdWPlaceholderAPI(this);
hook.register();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class ASkyBlockExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("ASkyBlock", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerASkyBlock(this).register();
}
Aggregations