mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-27 01:25:27 +02:00
Making the compiler happy
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user