use of com.github.sirblobman.combatlogx.api.ICombatLogX in project CombatLogX by SirBlobman.
the class LandsExpansion method afterEnable.
@Override
public void afterEnable() {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
Optional<Expansion> optionalNewbieHelper = expansionManager.getExpansion("NewbieHelper");
if (optionalNewbieHelper.isPresent()) {
new ListenerLands(this).register();
}
}
use of com.github.sirblobman.combatlogx.api.ICombatLogX in project CombatLogX by SirBlobman.
the class HookMVdWPlaceholderAPI method getEnemyPlaceholder.
private String getEnemyPlaceholder(Player player, String enemyPlaceholder) {
ICombatLogX plugin = this.expansion.getPlugin();
ICombatManager combatManager = plugin.getCombatManager();
LivingEntity enemy = combatManager.getEnemy(player);
if (enemy instanceof Player) {
Player playerEnemy = (Player) enemy;
String placeholder = String.format(Locale.US, "{%s}", enemyPlaceholder);
return PlaceholderAPI.replacePlaceholders(playerEnemy, placeholder);
}
return getUnknownEnemy(plugin, player);
}
use of com.github.sirblobman.combatlogx.api.ICombatLogX in project CombatLogX by SirBlobman.
the class HookMVdWPlaceholderAPI method getNewbieHelperPVPStatus.
private String getNewbieHelperPVPStatus(Player player) {
ICombatLogX plugin = this.expansion.getPlugin();
LanguageManager languageManager = plugin.getLanguageManager();
boolean pvp = true;
Expansion expansion = getNewbieHelper();
if (expansion != null) {
NewbieHelperExpansion newbieHelperExpansion = (NewbieHelperExpansion) expansion;
PVPManager pvpManager = newbieHelperExpansion.getPVPManager();
pvp = !pvpManager.isDisabled(player);
}
String messagePath = ("placeholder.pvp-status." + (pvp ? "enabled" : "disabled"));
return languageManager.getMessage(player, messagePath, null, true);
}
use of com.github.sirblobman.combatlogx.api.ICombatLogX in project CombatLogX by SirBlobman.
the class IridiumSkyblockExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("IridiumSkyblock", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerIridiumSkyblock(this).register();
}
use of com.github.sirblobman.combatlogx.api.ICombatLogX in project CombatLogX by SirBlobman.
the class SuperVanishExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("SuperVanish", true) && !checkDependency("PremiumVanish", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerVanish(this).register();
}
Aggregations