Search in sources :

Example 16 with ExpansionManager

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

the class FabledSkyBlockExpansion method onEnable.

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

Example 17 with ExpansionManager

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

the class CMIExpansion method onEnable.

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

Example 18 with ExpansionManager

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

the class RegionExpansion method onEnable.

@Override
public final void onEnable() {
    ICombatLogX plugin = getPlugin();
    if (!checkDependencies()) {
        Logger logger = getLogger();
        logger.info("Some dependencies for this expansion are missing!");
        ExpansionManager expansionManager = plugin.getExpansionManager();
        expansionManager.disableExpansion(this);
        return;
    }
    new RegionMoveListener(this).register();
    new RegionVulnerableListener(this).register();
    this.enabledSuccessfully = true;
    afterEnable();
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) Logger(java.util.logging.Logger)

Example 19 with ExpansionManager

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

the class CombatPlugin method onEnable.

@Override
public void onEnable() {
    new CommandCombatLogX(this).register();
    new CommandCombatTimer(this).register();
    new CommandTogglePVP(this).register();
    new ListenerConfiguration(this).register();
    new ListenerDamage(this).register();
    new ListenerPunish(this).register();
    new ListenerUntag(this).register();
    getDeathListener().register();
    this.timerUpdateTask.register();
    new UntagTask(this).register();
    ExpansionManager expansionManager = getExpansionManager();
    expansionManager.enableExpansions();
    broadcastEnableMessage();
    CorePlugin corePlugin = JavaPlugin.getPlugin(CorePlugin.class);
    UpdateManager updateManager = corePlugin.getUpdateManager();
    updateManager.addResource(this, 31689L);
}
Also used : UntagTask(com.github.sirblobman.combatlogx.task.UntagTask) CommandTogglePVP(com.github.sirblobman.combatlogx.command.CommandTogglePVP) ListenerPunish(com.github.sirblobman.combatlogx.listener.ListenerPunish) ListenerConfiguration(com.github.sirblobman.combatlogx.listener.ListenerConfiguration) CommandCombatTimer(com.github.sirblobman.combatlogx.command.CommandCombatTimer) ListenerDamage(com.github.sirblobman.combatlogx.listener.ListenerDamage) ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) CommandCombatLogX(com.github.sirblobman.combatlogx.command.combatlogx.CommandCombatLogX) UpdateManager(com.github.sirblobman.api.update.UpdateManager) ListenerUntag(com.github.sirblobman.combatlogx.listener.ListenerUntag) CorePlugin(com.github.sirblobman.api.core.CorePlugin)

Example 20 with ExpansionManager

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

the class CombatPlugin method onReload.

@Override
public void onReload() {
    ConfigurationManager configurationManager = getConfigurationManager();
    List<String> fileNameList = Arrays.asList("commands.yml", "config.yml", "punish.yml");
    for (String fileName : fileNameList) {
        configurationManager.reload(fileName);
    }
    LanguageManager languageManager = getLanguageManager();
    languageManager.reloadLanguages();
    IPunishManager punishManager = getPunishManager();
    punishManager.loadPunishments();
    ExpansionManager expansionManager = getExpansionManager();
    expansionManager.reloadConfigs();
}
Also used : IPunishManager(com.github.sirblobman.combatlogx.api.manager.IPunishManager) ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) LanguageManager(com.github.sirblobman.api.language.LanguageManager) ConfigurationManager(com.github.sirblobman.api.configuration.ConfigurationManager)

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