mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-26 09:05:28 +02:00
Unlimited custom xp perks Part 1
This commit is contained in:
@@ -34,6 +34,19 @@ public final class ExperienceAPI {
|
||||
return PrimarySkillType.getSkill(skillType) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Grabs the XP multiplier for a player for this specific skill
|
||||
* The multiplier will default to 1.0 and will be over written by any XP perks
|
||||
*
|
||||
* @param player target player
|
||||
* @param primarySkillType target skill
|
||||
* @return this players personal XP rate for target PrimarySkillType
|
||||
*/
|
||||
public float getPlayersPersonalXPRate(McMMOPlayer player, PrimarySkillType primarySkillType) {
|
||||
//First check if the player has ANY of the custom perks
|
||||
return player.getPlayerSpecificXPMult(primarySkillType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given skill type string is both valid and not a
|
||||
* child skill. (Child skills have no XP of their own, and their level is
|
||||
|
Reference in New Issue
Block a user