mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 18:24:43 +02:00
Added API to get level caps
Use getLevelCap(String skillType) to get a level cap of a specific skill. Use getPowerLevelCap() to get the power level cap.
This commit is contained in:
@ -237,6 +237,29 @@ public final class ExperienceAPI {
|
||||
return UserManager.getPlayer(player).getPowerLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the level cap of a specific skill.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param skillType The skill to get the level cap for
|
||||
* @return the level cap of a given skill
|
||||
*/
|
||||
public static int getLevelCap(String skillType) {
|
||||
return Config.getInstance().getLevelCap(SkillType.getSkill(skillType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the power level cap.
|
||||
* </br>
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @return the power level cap of a given skill
|
||||
*/
|
||||
public static int getPowerLevelCap() {
|
||||
return Config.getInstance().getPowerLevelCap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the level of a player in a specific skill type.
|
||||
* </br>
|
||||
|
Reference in New Issue
Block a user