mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Add ability to fire level-up event & notification with ExperienceAPI
This commit is contained in:
		@@ -99,9 +99,14 @@ public class ExperienceAPI {
 | 
			
		||||
     * @param player The player to add levels to
 | 
			
		||||
     * @param skillType Type of skill to add levels to
 | 
			
		||||
     * @param levels Number of levels to add
 | 
			
		||||
     * @param notify True if this should fire a level up notification, false otherwise.
 | 
			
		||||
     */
 | 
			
		||||
    public void addLevel(Player player, SkillType skillType, int levels) {
 | 
			
		||||
    public void addLevel(Player player, SkillType skillType, int levels, boolean notify) {
 | 
			
		||||
        Users.getProfile(player).addLevels(skillType, levels);
 | 
			
		||||
 | 
			
		||||
        if (notify) {
 | 
			
		||||
            checkXP(player, skillType);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user