diff --git a/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java index f58aa640f..8a005c961 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java @@ -143,7 +143,7 @@ public abstract class SkillCommand implements TabExecutor { } protected String[] calculateLengthDisplayValues() { - int maxLength = skill.getAbility().getMaxTicks(); + int maxLength = skill.getAbility().getMaxLength(); int length = 2 + (int) (skillValue / AdvancedConfig.getInstance().getAbilityLength()); int enduranceLength = PerksUtils.handleActivationPerks(player, length, maxLength); diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index e1ff48581..f56c6a226 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -330,7 +330,7 @@ public class Config extends AutoUpdateConfigLoader { public boolean getAbilitiesOnlyActivateWhenSneaking() { return config.getBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); } public int getCooldown(AbilityType ability) { return config.getInt("Abilities.Cooldowns." + ability.toString()); } - public int getMaxTicks(AbilityType ability) { return config.getInt("Abilities.Max_Seconds." + ability.toString()); } + public int getMaxLength(AbilityType ability) { return config.getInt("Abilities.Max_Seconds." + ability.toString()); } /* Durability Settings */ public int getAbilityToolDamage() { return config.getInt("Abilities.Tools.Durability_Loss", 2); } diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/AbilityType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/AbilityType.java index cae746ffa..722545ba4 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/AbilityType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/AbilityType.java @@ -99,8 +99,8 @@ public enum AbilityType { return Config.getInstance().getCooldown(this); } - public int getMaxTicks() { - return Config.getInstance().getMaxTicks(this); + public int getMaxLength() { + return Config.getInstance().getMaxLength(this); } public String getAbilityOn() { diff --git a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java index 12ed360dc..bb5f53776 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java @@ -283,7 +283,7 @@ public class SkillUtils { return; } - int ticks = PerksUtils.handleActivationPerks(player, 2 + (playerProfile.getSkillLevel(type) / AdvancedConfig.getInstance().getAbilityLength()), ability.getMaxTicks()); + int ticks = PerksUtils.handleActivationPerks(player, 2 + (playerProfile.getSkillLevel(type) / AdvancedConfig.getInstance().getAbilityLength()), ability.getMaxLength()); ParticleEffectUtils.playAbilityEnabledEffect(player); @@ -393,7 +393,7 @@ public class SkillUtils { McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); SkillType skill = mcMMOPlayer.getAbilityMode(AbilityType.SUPER_BREAKER) ? SkillType.MINING : SkillType.EXCAVATION; - int ticks = PerksUtils.handleActivationPerks(player, 2 + (mcMMOPlayer.getProfile().getSkillLevel(skill) / AdvancedConfig.getInstance().getAbilityLength()), skill.getAbility().getMaxTicks()) * Misc.TICK_CONVERSION_FACTOR; + int ticks = PerksUtils.handleActivationPerks(player, 2 + (mcMMOPlayer.getProfile().getSkillLevel(skill) / AdvancedConfig.getInstance().getAbilityLength()), skill.getAbility().getMaxLength()) * Misc.TICK_CONVERSION_FACTOR; PotionEffect abilityBuff = new PotionEffect(PotionEffectType.FAST_DIGGING, duration + ticks, amplifier + 10); player.addPotionEffect(abilityBuff, true);