use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class CombatPlugin method onLoad.
@Override
public void onLoad() {
ConfigurationChecker configurationChecker = new ConfigurationChecker(this);
configurationChecker.checkVersion();
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.saveDefault("config.yml");
configurationManager.saveDefault("commands.yml");
configurationManager.saveDefault("punish.yml");
LanguageManager languageManager = getLanguageManager();
languageManager.saveDefaultLanguages();
languageManager.reloadLanguages();
ExpansionManager expansionManager = getExpansionManager();
expansionManager.loadExpansions();
broadcastLoadMessage();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class CombatPlugin method onDisable.
@Override
public void onDisable() {
untagAllPlayers();
ExpansionManager expansionManager = getExpansionManager();
expansionManager.disableExpansions();
Bukkit.getScheduler().cancelTasks(this);
HandlerList.unregisterAll(this);
broadcastDisableMessage();
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class CommandCombatLogXAbout method getExpansionNames.
private Set<String> getExpansionNames() {
ExpansionManager expansionManager = getExpansionManager();
Set<String> expansionNameSet = new HashSet<>();
List<Expansion> expansionList = expansionManager.getAllExpansions();
for (Expansion expansion : expansionList) {
String expansionName = expansion.getName();
expansionNameSet.add(expansionName);
}
return Collections.unmodifiableSet(expansionNameSet);
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class ActionBarExpansion method onEnable.
@Override
public void onEnable() {
ICombatLogX plugin = getPlugin();
int minorVersion = VersionUtility.getMinorVersion();
if (minorVersion < 8) {
Logger logger = getLogger();
logger.warning("This expansion requires Spigot 1.8.8 or higher.");
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
ITimerManager timerManager = plugin.getTimerManager();
timerManager.addUpdaterTask(new ActionBarUpdater(this));
}
use of com.github.sirblobman.combatlogx.api.expansion.ExpansionManager in project CombatLogX by SirBlobman.
the class EssentialsExpansion method onEnable.
@Override
public void onEnable() {
if (!checkDependency("Essentials", true)) {
ICombatLogX plugin = getPlugin();
ExpansionManager expansionManager = plugin.getExpansionManager();
expansionManager.disableExpansion(this);
return;
}
new ListenerEssentials(this).register();
}
Aggregations