Search in sources :

Example 21 with ExpansionManager

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.

the class HookPlaceholderAPI 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;
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) State(com.github.sirblobman.combatlogx.api.expansion.Expansion.State) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) NewbieHelperExpansion(combatlogx.expansion.newbie.helper.NewbieHelperExpansion) PlaceholderExpansion(me.clip.placeholderapi.expansion.PlaceholderExpansion) Expansion(com.github.sirblobman.combatlogx.api.expansion.Expansion)

Example 22 with ExpansionManager

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.

the class SuperiorSkyblockExpansion method onEnable.

@Override
public void onEnable() {
    if (!checkDependency("SuperiorSkyblock2", true)) {
        ICombatLogX plugin = getPlugin();
        ExpansionManager expansionManager = plugin.getExpansionManager();
        expansionManager.disableExpansion(this);
        return;
    }
    new ListenerSuperiorSkyblock(this).register();
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) ListenerSuperiorSkyblock(combatlogx.expansion.compatibility.superior.skyblock.listener.ListenerSuperiorSkyblock) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX)

Example 23 with ExpansionManager

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.

the class ForceFieldExpansion method onEnable.

@Override
public void onEnable() {
    if (!checkDependency("ProtocolLib", true)) {
        ExpansionManager expansionManager = getPlugin().getExpansionManager();
        expansionManager.disableExpansion(this);
        return;
    }
    registerForceFieldListener();
    this.successfullyEnabled = true;
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)

Example 24 with ExpansionManager

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.

the class RewardExpansion method onEnable.

@Override
public void onEnable() {
    ICombatLogX plugin = getPlugin();
    ExpansionManager expansionManager = plugin.getExpansionManager();
    if (!checkDependency("Vault", true)) {
        expansionManager.disableExpansion(this);
        return;
    }
    this.hookVault = new HookVault(this);
    if (!this.hookVault.setupEconomy()) {
        expansionManager.disableExpansion(this);
        return;
    }
    RewardManager rewardManager = getRewardManager();
    rewardManager.loadRewards();
    new ListenerRewards(this).register();
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) ListenerRewards(combatlogx.expansion.rewards.listener.ListenerRewards) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) HookVault(combatlogx.expansion.rewards.hook.HookVault) RewardManager(combatlogx.expansion.rewards.manager.RewardManager)

Example 25 with ExpansionManager

use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.

the class VanishNoPacketExpansion method onEnable.

@Override
public void onEnable() {
    if (!checkDependency("VanishNoPacket", true, "3")) {
        ICombatLogX plugin = getPlugin();
        ExpansionManager expansionManager = plugin.getExpansionManager();
        expansionManager.disableExpansion(this);
        return;
    }
    new ListenerVanish(this).register();
}
Also used : ListenerVanish(combatlogx.expansion.compatibility.vnp.listener.ListenerVanish) ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX)

Aggregations

ExpansionManager (com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)33 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)24 Expansion (com.github.sirblobman.combatlogx.api.expansion.Expansion)7 Logger (java.util.logging.Logger)4 NewbieHelperExpansion (combatlogx.expansion.newbie.helper.NewbieHelperExpansion)3 ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)2 LanguageManager (com.github.sirblobman.api.language.LanguageManager)2 State (com.github.sirblobman.combatlogx.api.expansion.Expansion.State)2 RegionExpansion (com.github.sirblobman.combatlogx.api.expansion.region.RegionExpansion)2 CorePlugin (com.github.sirblobman.api.core.CorePlugin)1 UpdateManager (com.github.sirblobman.api.update.UpdateManager)1 RegionHandler (com.github.sirblobman.combatlogx.api.expansion.region.RegionHandler)1 IPunishManager (com.github.sirblobman.combatlogx.api.manager.IPunishManager)1 ITimerManager (com.github.sirblobman.combatlogx.api.manager.ITimerManager)1 CommandCombatTimer (com.github.sirblobman.combatlogx.command.CommandCombatTimer)1 CommandTogglePVP (com.github.sirblobman.combatlogx.command.CommandTogglePVP)1 CommandCombatLogX (com.github.sirblobman.combatlogx.command.combatlogx.CommandCombatLogX)1 ConfigurationChecker (com.github.sirblobman.combatlogx.configuration.ConfigurationChecker)1 ListenerConfiguration (com.github.sirblobman.combatlogx.listener.ListenerConfiguration)1 ListenerDamage (com.github.sirblobman.combatlogx.listener.ListenerDamage)1