Search in sources :

Example 86 with ICombatLogX

use of com.github.sirblobman.combatlogx.api.ICombatLogX 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;
}
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) Expansion(com.github.sirblobman.combatlogx.api.expansion.Expansion)

Example 87 with ICombatLogX

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

the class HookMVdWPlaceholderAPI method register.

public void register() {
    ICombatLogX combatLogX = this.expansion.getPlugin();
    JavaPlugin plugin = combatLogX.getPlugin();
    PlaceholderAPI.registerPlaceholder(plugin, "combatlogx_*", this);
}
Also used : JavaPlugin(org.bukkit.plugin.java.JavaPlugin) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX)

Example 88 with ICombatLogX

use of com.github.sirblobman.combatlogx.api.ICombatLogX 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();
}
Also used : ExpansionManager(com.github.sirblobman.combatlogx.api.expansion.ExpansionManager) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX)

Example 89 with ICombatLogX

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

the class CombatNpcManager method saveData.

public void saveData(OfflinePlayer player) {
    ICombatLogX plugin = getCombatLogX();
    PlayerDataManager playerDataManager = plugin.getPlayerDataManager();
    playerDataManager.save(player);
}
Also used : ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) PlayerDataManager(com.github.sirblobman.api.configuration.PlayerDataManager)

Example 90 with ICombatLogX

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

the class CombatNpcManager method getData.

public YamlConfiguration getData(OfflinePlayer player) {
    ICombatLogX plugin = getCombatLogX();
    PlayerDataManager playerDataManager = plugin.getPlayerDataManager();
    return playerDataManager.get(player);
}
Also used : ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) PlayerDataManager(com.github.sirblobman.api.configuration.PlayerDataManager)

Aggregations

ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)96 ExpansionManager (com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)24 ICombatManager (com.github.sirblobman.combatlogx.api.manager.ICombatManager)19 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)19 Player (org.bukkit.entity.Player)18 JavaPlugin (org.bukkit.plugin.java.JavaPlugin)14 LivingEntity (org.bukkit.entity.LivingEntity)13 LanguageManager (com.github.sirblobman.api.language.LanguageManager)12 Logger (java.util.logging.Logger)11 ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)10 MultiVersionHandler (com.github.sirblobman.api.nms.MultiVersionHandler)9 PlayerDataManager (com.github.sirblobman.api.configuration.PlayerDataManager)8 Expansion (com.github.sirblobman.combatlogx.api.expansion.Expansion)8 List (java.util.List)8 Replacer (com.github.sirblobman.api.language.Replacer)6 EntityHandler (com.github.sirblobman.api.nms.EntityHandler)5 State (com.github.sirblobman.combatlogx.api.expansion.Expansion.State)5 Collections (java.util.Collections)5 EventHandler (org.bukkit.event.EventHandler)5 NewbieHelperExpansion (combatlogx.expansion.newbie.helper.NewbieHelperExpansion)4