Search in sources :

Example 1 with IPunishManager

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

the class PlaceholderHelper method getPunishmentCount.

public static String getPunishmentCount(ICombatLogX plugin, Player player) {
    IPunishManager punishManager = plugin.getPunishManager();
    long punishmentCount = punishManager.getPunishmentCount(player);
    return Long.toString(punishmentCount);
}
Also used : IPunishManager(com.github.sirblobman.combatlogx.api.manager.IPunishManager)

Example 2 with IPunishManager

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

the class ListenerUntag method onUntag.

@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onUntag(PlayerUntagEvent e) {
    Player player = e.getPlayer();
    LivingEntity previousEnemy = e.getPreviousEnemy();
    UntagReason untagReason = e.getUntagReason();
    ICombatLogX plugin = getCombatLogX();
    IPunishManager punishManager = plugin.getPunishManager();
    punishManager.punish(player, untagReason, previousEnemy);
    sendUntagMessage(player, untagReason);
    runUntagCommands(player, previousEnemy);
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) IPunishManager(com.github.sirblobman.combatlogx.api.manager.IPunishManager) Player(org.bukkit.entity.Player) ICombatLogX(com.github.sirblobman.combatlogx.api.ICombatLogX) UntagReason(com.github.sirblobman.combatlogx.api.object.UntagReason) EventHandler(org.bukkit.event.EventHandler)

Example 3 with IPunishManager

use of com.github.sirblobman.combatlogx.api.manager.IPunishManager 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

IPunishManager (com.github.sirblobman.combatlogx.api.manager.IPunishManager)3 ConfigurationManager (com.github.sirblobman.api.configuration.ConfigurationManager)1 LanguageManager (com.github.sirblobman.api.language.LanguageManager)1 ICombatLogX (com.github.sirblobman.combatlogx.api.ICombatLogX)1 ExpansionManager (com.github.sirblobman.combatlogx.api.expansion.ExpansionManager)1 UntagReason (com.github.sirblobman.combatlogx.api.object.UntagReason)1 LivingEntity (org.bukkit.entity.LivingEntity)1 Player (org.bukkit.entity.Player)1 EventHandler (org.bukkit.event.EventHandler)1