mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Missed a refactor :P Also, javadoc event
This commit is contained in:
@ -10,7 +10,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SecondaryAbility;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
@ -28,11 +28,11 @@ public class AcrobaticsManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canRoll() {
|
||||
return !exploitPrevention() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.ROLL);
|
||||
return !exploitPrevention() && Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.ROLL);
|
||||
}
|
||||
|
||||
public boolean canDodge(Entity damager) {
|
||||
if (Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbilityType.DODGE)) {
|
||||
if (Permissions.secondaryAbilityEnabled(getPlayer(), SecondaryAbility.DODGE)) {
|
||||
if (damager instanceof LightningStrike && Acrobatics.dodgeLightningDisabled) {
|
||||
return false;
|
||||
}
|
||||
@ -53,7 +53,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
double modifiedDamage = Acrobatics.calculateModifiedDodgeDamage(damage, Acrobatics.dodgeDamageModifier);
|
||||
Player player = getPlayer();
|
||||
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.DODGE, player, getSkillLevel(), activationChance)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbility.DODGE, player, getSkillLevel(), activationChance)) {
|
||||
ParticleEffectUtils.playDodgeEffect(player);
|
||||
|
||||
if (mcMMOPlayer.useChatNotifications()) {
|
||||
@ -80,13 +80,13 @@ public class AcrobaticsManager extends SkillManager {
|
||||
public double rollCheck(double damage) {
|
||||
Player player = getPlayer();
|
||||
|
||||
if (player.isSneaking() && Permissions.secondaryAbilityEnabled(player, SecondaryAbilityType.GRACEFUL_ROLL)) {
|
||||
if (player.isSneaking() && Permissions.secondaryAbilityEnabled(player, SecondaryAbility.GRACEFUL_ROLL)) {
|
||||
return gracefulRollCheck(damage);
|
||||
}
|
||||
|
||||
double modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.rollThreshold);
|
||||
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.ROLL, player, getSkillLevel(), activationChance)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbility.ROLL, player, getSkillLevel(), activationChance)) {
|
||||
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Text"));
|
||||
applyXpGain(calculateRollXP(damage, true));
|
||||
|
||||
@ -110,7 +110,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
private double gracefulRollCheck(double damage) {
|
||||
double modifiedDamage = Acrobatics.calculateModifiedRollDamage(damage, Acrobatics.gracefulRollThreshold);
|
||||
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbilityType.GRACEFUL_ROLL, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
if (!isFatal(modifiedDamage) && SkillUtils.activationSuccessful(SecondaryAbility.GRACEFUL_ROLL, getPlayer(), getSkillLevel(), activationChance)) {
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Acrobatics.Ability.Proc"));
|
||||
applyXpGain(calculateRollXP(damage, true));
|
||||
|
||||
|
Reference in New Issue
Block a user