use of com.archyx.aureliumskills.ui.ActionBar in project AureliumSkills by Archy-X.
the class AureliumSkills method registerEvents.
public void registerEvents() {
// Registers Events
PluginManager pm = getServer().getPluginManager();
pm.registerEvents(new PlayerJoinQuit(this), this);
regionBlockListener = new RegionBlockListener(this);
pm.registerEvents(regionBlockListener, this);
pm.registerEvents(new FarmingLeveler(this), this);
if (VersionUtils.isAtLeastVersion(16)) {
pm.registerEvents(new FarmingHarvestLeveler(this), this);
} else {
pm.registerEvents(new FarmingInteractLeveler(this), this);
}
pm.registerEvents(new ForagingLeveler(this), this);
pm.registerEvents(new MiningLeveler(this), this);
pm.registerEvents(new ExcavationLeveler(this), this);
pm.registerEvents(new FishingLeveler(this), this);
pm.registerEvents(new FightingLeveler(this), this);
pm.registerEvents(new ArcheryLeveler(this), this);
pm.registerEvents(new DefenseLeveler(this), this);
EnduranceLeveler enduranceLeveler = new EnduranceLeveler(this);
enduranceLeveler.startTracking();
pm.registerEvents(enduranceLeveler, this);
pm.registerEvents(new AgilityLeveler(this), this);
pm.registerEvents(new AlchemyLeveler(this), this);
pm.registerEvents(new EnchantingLeveler(this), this);
sorceryLeveler = new SorceryLeveler(this);
pm.registerEvents(new HealingLeveler(this), this);
pm.registerEvents(new ForgingLeveler(this), this);
pm.registerEvents(new Luck(this), this);
pm.registerEvents(new Wisdom(this), this);
pm.registerEvents(new FarmingAbilities(this), this);
pm.registerEvents(new ForagingAbilities(this), this);
pm.registerEvents(new MiningAbilities(this), this);
pm.registerEvents(new FishingAbilities(this), this);
excavationAbilities = new ExcavationAbilities(this);
pm.registerEvents(excavationAbilities, this);
pm.registerEvents(new ArcheryAbilities(this), this);
DefenseAbilities defenseAbilities = new DefenseAbilities(this);
pm.registerEvents(defenseAbilities, this);
FightingAbilities fightingAbilities = new FightingAbilities(this);
pm.registerEvents(fightingAbilities, this);
pm.registerEvents(new FightingAbilities(this), this);
pm.registerEvents(new EnduranceAbilities(this), this);
pm.registerEvents(new AgilityAbilities(this), this);
pm.registerEvents(new AlchemyAbilities(this), this);
pm.registerEvents(new EnchantingAbilities(this), this);
pm.registerEvents(new HealingAbilities(this), this);
pm.registerEvents(new ForgingAbilities(this), this);
pm.registerEvents(new DamageListener(this, defenseAbilities, fightingAbilities), this);
// Load mana manager
manaManager = new ManaManager(this);
getServer().getPluginManager().registerEvents(manaManager, this);
manaManager.startRegen();
ItemListener itemListener = new ItemListener(this);
pm.registerEvents(itemListener, this);
itemListener.scheduleTask();
pm.registerEvents(new ArmorListener(OptionL.getList(Option.MODIFIER_ARMOR_EQUIP_BLOCKED_MATERIALS)), this);
pm.registerEvents(new ArmorModifierListener(this), this);
pm.registerEvents(new RequirementListener(this), this);
this.actionBar = new ActionBar(this);
pm.registerEvents(actionBar, this);
pm.registerEvents(new RegionListener(this), this);
pm.registerEvents(new FishingLootHandler(this), this);
pm.registerEvents(new ExcavationLootHandler(this), this);
pm.registerEvents(new MiningLootHandler(this), this);
pm.registerEvents(new ForagingLootHandler(this), this);
}
use of com.archyx.aureliumskills.ui.ActionBar in project AureliumSkills by Archy-X.
the class SkillsCommand method onActionBarToggle.
@Subcommand("toggle")
@CommandAlias("abtoggle")
@CommandPermission("aureliumskills.abtoggle")
@Description("Toggle your own action bar")
public void onActionBarToggle(Player player) {
Locale locale = plugin.getLang().getLocale(player);
ActionBar actionBar = plugin.getActionBar();
if (OptionL.getBoolean(Option.ACTION_BAR_ENABLED)) {
if (actionBar.getActionBarDisabled().contains(player.getUniqueId())) {
actionBar.getActionBarDisabled().remove(player.getUniqueId());
player.sendMessage(AureliumSkills.getPrefix(locale) + Lang.getMessage(CommandMessage.TOGGLE_ENABLED, locale));
} else {
actionBar.getActionBarDisabled().add(player.getUniqueId());
player.sendMessage(AureliumSkills.getPrefix(locale) + Lang.getMessage(CommandMessage.TOGGLE_DISABLED, locale));
}
} else {
player.sendMessage(AureliumSkills.getPrefix(locale) + Lang.getMessage(CommandMessage.TOGGLE_NOT_ENABLED, locale));
}
}
Aggregations