diff --git a/src/main/java/com/gmail/nossr50/skills/SkillCommand.java b/src/main/java/com/gmail/nossr50/skills/SkillCommand.java index d99a94d04..2fed8c054 100644 --- a/src/main/java/com/gmail/nossr50/skills/SkillCommand.java +++ b/src/main/java/com/gmail/nossr50/skills/SkillCommand.java @@ -12,7 +12,6 @@ import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.skills.utilities.SkillTools; import com.gmail.nossr50.skills.utilities.SkillType; -import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.StringUtils; import com.gmail.nossr50.util.Users; @@ -124,7 +123,7 @@ public abstract class SkillCommand implements CommandExecutor { protected String[] calculateLengthDisplayValues() { int maxLength = skill.getAbility().getMaxTicks(); - int length = 2 + (int) (skillValue / Misc.abilityLengthIncreaseLevel); + int length = 2 + (int) (skillValue / SkillTools.abilityLengthIncreaseLevel); int enduranceLength = 0; if (player.hasPermission("mcmmo.perks.activationtime.twelveseconds")) { diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java index dcf053a19..55be50364 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java @@ -33,8 +33,9 @@ import com.gmail.nossr50.util.Users; public class SkillTools { static AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); - public static int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength(); public static boolean abilitiesEnabled = Config.getInstance().getAbilitiesEnabled(); + public static int toolDurabilityLoss = Config.getInstance().getAbilityToolDamage(); + public static int abilityLengthIncreaseLevel = AdvancedConfig.getInstance().getAbilityLength(); public static final int LUCKY_SKILL_ACTIVATION_CHANCE = 75; public static final int NORMAL_SKILL_ACTIVATION_CHANCE = 100; diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java index 886d82aa3..cdbc3a263 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java @@ -17,6 +17,7 @@ import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mods.ModChecks; import com.gmail.nossr50.mods.datatypes.CustomBlock; import com.gmail.nossr50.skills.utilities.CombatTools; +import com.gmail.nossr50.skills.utilities.SkillTools; import com.gmail.nossr50.skills.utilities.SkillType; import com.gmail.nossr50.skills.woodcutting.Woodcutting.ExperienceGainMethod; import com.gmail.nossr50.util.BlockChecks; @@ -142,7 +143,7 @@ public final class TreeFeller { for (Block block : treeFellerBlocks) { if (BlockChecks.isLog(block) && Misc.getRandom().nextInt(unbreakingLevel + 1) == 0) { - durabilityLoss += Misc.toolDurabilityLoss; + durabilityLoss += SkillTools.toolDurabilityLoss; } } diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 1cf442c33..5938912e6 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -12,7 +12,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.PluginManager; import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.events.fake.FakeBlockBreakEvent; import com.gmail.nossr50.events.fake.FakeBlockDamageEvent; @@ -22,8 +21,6 @@ import com.gmail.nossr50.mods.ModChecks; public final class Misc { private static Random random = new Random(); - public static int toolDurabilityLoss = Config.getInstance().getAbilityToolDamage(); - public static int abilityLengthIncreaseLevel = AdvancedConfig.getInstance().getAbilityLength(); public static boolean isSpawnerXPEnabled = Config.getInstance().getExperienceGainsMobspawnersEnabled(); public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5; public static final int TIME_CONVERSION_FACTOR = 1000;