use of com.herocraftonline.heroes.characters.classes.HeroClass in project MagicPlugin by elBukkit.
the class HeroesManager method getSkillList.
public List<String> getSkillList(Player player, boolean showUnuseable, boolean showPassive) {
if (skills == null)
return emptySkillList;
Hero hero = getHero(player);
if (hero == null)
return emptySkillList;
HeroClass heroClass = hero.getHeroClass();
HeroClass secondClass = hero.getSecondClass();
Set<String> primarySkills = new HashSet<>();
Set<String> secondarySkills = new HashSet<>();
addSkills(hero, heroClass, primarySkills, showUnuseable, showPassive);
addSkills(hero, secondClass, secondarySkills, showUnuseable, showPassive);
secondarySkills.removeAll(primarySkills);
Multimap<Integer, Skill> primaryMap = mapSkillsByLevel(hero, primarySkills);
Multimap<Integer, Skill> secondaryMap = mapSkillsByLevel(hero, secondarySkills);
List<String> skillNames = new ArrayList<>();
for (Skill skill : primaryMap.values()) {
skillNames.add(skill.getName());
}
for (Skill skill : secondaryMap.values()) {
skillNames.add(skill.getName());
}
return skillNames;
}
use of com.herocraftonline.heroes.characters.classes.HeroClass in project MagicPlugin by elBukkit.
the class HeroesManager method getSecondaryClassName.
public String getSecondaryClassName(Player player) {
Hero hero = getHero(player);
if (hero == null)
return "";
HeroClass heroClass = hero.getSecondClass();
if (heroClass == null)
return "";
return heroClass.getName();
}
use of com.herocraftonline.heroes.characters.classes.HeroClass in project MagicPlugin by elBukkit.
the class HeroesManager method getSkills.
public Set<String> getSkills(Player player, boolean showUnuseable, boolean showPassive) {
if (skills == null)
return emptySkills;
Hero hero = getHero(player);
if (hero == null)
return emptySkills;
Set<String> skillSet = new HashSet<>();
HeroClass heroClass = hero.getHeroClass();
HeroClass secondClass = hero.getSecondClass();
addSkills(hero, heroClass, skillSet, showUnuseable, showPassive);
addSkills(hero, secondClass, skillSet, showUnuseable, showPassive);
return skillSet;
}
use of com.herocraftonline.heroes.characters.classes.HeroClass in project MagicPlugin by elBukkit.
the class HeroesManager method getClassName.
public String getClassName(Player player) {
Hero hero = getHero(player);
if (hero == null)
return "";
HeroClass heroClass = hero.getHeroClass();
if (heroClass == null)
return "";
return heroClass.getName();
}
Aggregations