use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class CommandCombatLogXAbout method execute.
@Override
protected boolean execute(CommandSender sender, String[] args) {
if (!checkPermission(sender, "combatlogx.command.combatlogx.about", true)) {
return true;
}
if (args.length < 1) {
return false;
}
String expansionName = args[0];
Optional<Expansion> optionalExpansion = getExpansion(expansionName);
if (!optionalExpansion.isPresent()) {
Replacer replacer = message -> message.replace("{target}", expansionName);
sendMessageWithPrefix(sender, "error.unknown-expansion", replacer, true);
return true;
}
Expansion expansion = optionalExpansion.get();
sendExpansionInformation(sender, expansion);
return true;
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerBuckets method getConfiguration.
private YamlConfiguration getConfiguration() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
return configurationManager.get("buckets.yml");
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerLegacyItemPickup method isAllowed.
private boolean isAllowed() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("items.yml");
return !configuration.getBoolean("prevent-pickup");
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerInventories method getConfiguration.
private YamlConfiguration getConfiguration() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
return configurationManager.get("inventories.yml");
}
use of com.github.sirblobman.combatlogx.api.expansion.Expansion in project CombatLogX by SirBlobman.
the class ListenerRiptide method getConfiguration.
private YamlConfiguration getConfiguration() {
Expansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
return configurationManager.get("items.yml");
}
Aggregations