1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-06-20 07:51:25 +02:00

Experience is occasionally zero or cast to zero.

Fixes  and fixes 
This commit is contained in:
Glitchfinder 2013-10-30 15:49:47 -07:00
parent 4889769522
commit d6c6c75157

@ -468,7 +468,11 @@ public class McMMOPlayer {
* @param xp Experience amount to process
*/
public void beginXpGain(SkillType skill, float xp) {
Validate.isTrue(xp > 0, "XP gained should be greater than zero.");
Validate.isTrue(xp >= 0.0, "XP gained should be greater than or equal to zero.");
if (xp <= 0.0) {
return;
}
if (skill.isChildSkill()) {
Set<SkillType> parentSkills = FamilyTree.getParents(skill);