mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
2.1.67
This commit is contained in:
@ -2,7 +2,9 @@ package com.gmail.nossr50.util.player;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -37,4 +39,15 @@ public class PlayerLevelUtils {
|
||||
{
|
||||
return earlyGameBoostCutoffs.get(primarySkillType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a player is currently qualifying for the early game boosted XP
|
||||
* Will return false only if a player is above the boost level cutoff, it does not check config settings to see if the early game boost is on
|
||||
* @param mcMMOPlayer target player
|
||||
* @param primarySkillType target skill
|
||||
* @return if the player would qualify for the XP boost if its enabled
|
||||
*/
|
||||
public static boolean qualifiesForEarlyGameBoost(McMMOPlayer mcMMOPlayer, PrimarySkillType primarySkillType) {
|
||||
return mcMMOPlayer.getSkillLevel(primarySkillType) < mcMMO.getPlayerLevelUtils().getEarlyGameCutoff(primarySkillType);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user