mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Experience is occasionally zero or cast to zero.
Fixes #1575 and fixes #1576
This commit is contained in:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user