diff --git a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java index e0919ca35..69069f2bd 100644 --- a/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java +++ b/src/main/java/com/gmail/nossr50/api/ExperienceAPI.java @@ -1003,9 +1003,10 @@ public final class ExperienceAPI { * @param level The level to get the amount of XP for * @param formulaType The formula type to get the amount of XP for * @throws InvalidFormulaTypeException if the given formulaType is not valid + * @deprecated Discouraged - Most the time you do not want to provide the formula type yourself, use the other method */ - public static int getXpNeededToLevel(int level, String formulaType) { - return mcMMO.getFormulaManager().getXPtoNextLevel(level, getFormulaType(formulaType)); + public static int getXpNeededToLevel(int level, FormulaType formulaType) { + return mcMMO.getFormulaManager().getXPtoNextLevel(level, formulaType); } /** @@ -1135,16 +1136,6 @@ public final class ExperienceAPI { return xpGainReason; } - private static FormulaType getFormulaType(String formula) throws InvalidFormulaTypeException { - FormulaType formulaType = FormulaType.getFormulaType(formula); - - if (formulaType == null) { - throw new InvalidFormulaTypeException(); - } - - return formulaType; - } - /** * @param player target player * @return McMMOPlayer for that player if the profile is loaded, otherwise null diff --git a/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceCommand.java b/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceCommand.java index 03798e2f5..02b0468bd 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/alliance/PartyAllianceCommand.java @@ -5,9 +5,9 @@ import com.gmail.nossr50.datatypes.party.PartyFeature; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.PartyManager; -import com.gmail.nossr50.util.commands.CommandUtils; import com.gmail.nossr50.util.player.UserManager; import com.google.common.collect.ImmutableList; +import com.gmail.nossr50.util.commands.CommandUtils; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -125,7 +125,6 @@ public class PartyAllianceCommand implements TabExecutor { } private void displayMemberInfo(McMMOPlayer mcMMOPlayer) { - List nearMembers = PartyManager.getNearMembers(mcMMOPlayer); player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Members.Header")); player.sendMessage(playerParty.createMembersList(player)); player.sendMessage(ChatColor.DARK_GRAY + "----------------------------"); diff --git a/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java index 70ea0a988..6be6ab81e 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.commands.skills; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.axes.Axes; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.TextComponentFactory; @@ -87,7 +88,7 @@ public class AxesCommand extends SkillCommand { } if (canGreaterImpact) { - messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", Axes.greaterImpactBonusDamage))); + messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", mcMMO.getConfigManager().getConfigAxes().getGreaterImpactBonusDamage()))); } if (canSkullSplitter) { diff --git a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesCriticalStrikes.java b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesCriticalStrikes.java index 5cd947c24..5c5328acc 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesCriticalStrikes.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/skills/axes/ConfigAxesCriticalStrikes.java @@ -18,7 +18,7 @@ public class ConfigAxesCriticalStrikes { @Setting(value = "Maximum-Level", comment = "This is the level at which full benefits for this skill will be reached." + "\nProperties of this skill may or may not scale with level, but those that do will gradually increase until max level is achieved.") - private AbstractMaximumProgressionLevel maximumProgressionLevel = new AbstractMaximumProgressionLevel(SubSkillType.AXES_CRITICAL_STRIKES, 100, 1000); + private AbstractMaximumProgressionLevel maximumProgressionLevel = new AbstractMaximumProgressionLevel(100, 1000); @Setting(value = "Damage-Modifiers", comment = "Damage dealt is multiplied by these values when this skill is successfully activated.") private DamageProperty damageProperty = new AbstractDamageProperty(1.5, 2.0); diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/properties/AbstractScalingProperty.java b/src/main/java/com/gmail/nossr50/datatypes/skills/properties/AbstractScalingProperty.java index 9c8c2a83e..be43b6dab 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/properties/AbstractScalingProperty.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/properties/AbstractScalingProperty.java @@ -10,11 +10,6 @@ public abstract class AbstractScalingProperty implements ScalingProperty { this.subSkillType = subSkillType; } - @Override - public SubSkillType getSubSkillType() { - return subSkillType; - } - @Override public String toString() { return "AbstractScalingProperty{" +