use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class HookMVdWPlaceholderAPI method getNewbieHelperProtected.
private String getNewbieHelperProtected(Player player) {
boolean isProtected = false;
Expansion expansion = getNewbieHelper();
if (expansion != null) {
NewbieHelperExpansion newbieHelperExpansion = (NewbieHelperExpansion) expansion;
ProtectionManager protectionManager = newbieHelperExpansion.getProtectionManager();
isProtected = protectionManager.isProtected(player);
}
return Boolean.toString(isProtected);
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion 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;
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerTotem method getConfiguration.
private YamlConfiguration getConfiguration() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
return configurationManager.get("items.yml");
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class CheatPreventionListener method getNewMessageCooldownExpireTime.
private long getNewMessageCooldownExpireTime() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
long cooldownSeconds = configuration.getLong("message-cooldown");
long cooldownMillis = (cooldownSeconds * 1_000L);
long systemMillis = System.currentTimeMillis();
return (systemMillis + cooldownMillis);
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerChat method getConfiguration.
private YamlConfiguration getConfiguration() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
return configurationManager.get("chat.yml");
}
Aggregations