Changed secondary abilities to use constants instead of enum

This commit is contained in:
ile123ile
2014-08-24 11:45:13 -07:00
parent 0700e4354c
commit edd764d5e6
41 changed files with 288 additions and 964 deletions

View File

@ -24,15 +24,15 @@ public class ArcheryManager extends SkillManager {
}
public boolean canDaze(LivingEntity target) {
return target instanceof Player && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.DAZE);
return target instanceof Player && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.daze);
}
public boolean canSkillShot() {
return getSkillLevel() >= Archery.skillShotIncreaseLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.SKILL_SHOT);
return getSkillLevel() >= Archery.skillShotIncreaseLevel && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.skillShot);
}
public boolean canRetrieveArrows() {
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.RETRIEVE);
return Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.retrieve);
}
/**
@ -58,7 +58,7 @@ public class ArcheryManager extends SkillManager {
* @param target The {@link LivingEntity} damaged by the arrow
*/
public void retrieveArrows(LivingEntity target) {
if (SkillUtils.activationSuccessful(SecondaryAbility.RETRIEVE, getPlayer(), getSkillLevel(), activationChance)) {
if (SkillUtils.activationSuccessful(SecondaryAbility.retrieve, getPlayer(), getSkillLevel(), activationChance)) {
Archery.incrementTrackerValue(target);
}
}
@ -69,7 +69,7 @@ public class ArcheryManager extends SkillManager {
* @param defender The {@link Player} being affected by the ability
*/
public double daze(Player defender) {
if (!SkillUtils.activationSuccessful(SecondaryAbility.DAZE, getPlayer(), getSkillLevel(), activationChance)) {
if (!SkillUtils.activationSuccessful(SecondaryAbility.daze, getPlayer(), getSkillLevel(), activationChance)) {
return 0;
}
@ -96,7 +96,7 @@ public class ArcheryManager extends SkillManager {
* @param damage The amount of damage initially dealt by the event
*/
public double skillShot(double damage) {
if (!SkillUtils.activationSuccessful(SecondaryAbility.SKILL_SHOT, getPlayer())) {
if (!SkillUtils.activationSuccessful(SecondaryAbility.skillShot, getPlayer())) {
return damage;
}