Making the compiler happy

This commit is contained in:
nossr50 2019-06-03 00:31:46 -07:00
parent 29876b4a20
commit 7a0ef0d4ed
5 changed files with 7 additions and 21 deletions

View File

@ -1003,9 +1003,10 @@ public final class ExperienceAPI {
* @param level The level to get the amount of XP for * @param level The level to get the amount of XP for
* @param formulaType The formula type 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 * @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) { public static int getXpNeededToLevel(int level, FormulaType formulaType) {
return mcMMO.getFormulaManager().getXPtoNextLevel(level, getFormulaType(formulaType)); return mcMMO.getFormulaManager().getXPtoNextLevel(level, formulaType);
} }
/** /**
@ -1135,16 +1136,6 @@ public final class ExperienceAPI {
return xpGainReason; 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 * @param player target player
* @return McMMOPlayer for that player if the profile is loaded, otherwise null * @return McMMOPlayer for that player if the profile is loaded, otherwise null

View File

@ -5,9 +5,9 @@ import com.gmail.nossr50.datatypes.party.PartyFeature;
import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.player.McMMOPlayer;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.util.commands.CommandUtils;
import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.player.UserManager;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.gmail.nossr50.util.commands.CommandUtils;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
@ -125,7 +125,6 @@ public class PartyAllianceCommand implements TabExecutor {
} }
private void displayMemberInfo(McMMOPlayer mcMMOPlayer) { private void displayMemberInfo(McMMOPlayer mcMMOPlayer) {
List<Player> nearMembers = PartyManager.getNearMembers(mcMMOPlayer);
player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Members.Header")); player.sendMessage(LocaleLoader.getString("Commands.Party.Alliance.Members.Header"));
player.sendMessage(playerParty.createMembersList(player)); player.sendMessage(playerParty.createMembersList(player));
player.sendMessage(ChatColor.DARK_GRAY + "----------------------------"); player.sendMessage(ChatColor.DARK_GRAY + "----------------------------");

View File

@ -3,6 +3,7 @@ package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.axes.Axes; import com.gmail.nossr50.skills.axes.Axes;
import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.TextComponentFactory; import com.gmail.nossr50.util.TextComponentFactory;
@ -87,7 +88,7 @@ public class AxesCommand extends SkillCommand {
} }
if (canGreaterImpact) { 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) { if (canSkullSplitter) {

View File

@ -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." + @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.") "\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.") @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); private DamageProperty damageProperty = new AbstractDamageProperty(1.5, 2.0);

View File

@ -10,11 +10,6 @@ public abstract class AbstractScalingProperty implements ScalingProperty {
this.subSkillType = subSkillType; this.subSkillType = subSkillType;
} }
@Override
public SubSkillType getSubSkillType() {
return subSkillType;
}
@Override @Override
public String toString() { public String toString() {
return "AbstractScalingProperty{" + return "AbstractScalingProperty{" +