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 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