Only apply permissions when skill is enabled

This commit is contained in:
T00thpick1 2013-05-13 20:19:50 -04:00
parent 0261d16140
commit 8552192894

View File

@ -506,14 +506,15 @@ public class McMMOPlayer {
Set<SkillType> parentSkills = FamilyTree.getParents(skillType);
for (SkillType parentSkill : parentSkills) {
if (Permissions.skillEnabled(player, parentSkill)) {
applyXpGain(parentSkill, xp / parentSkills.size());
}
applyXpGain(parentSkill, xp / parentSkills.size());
}
return;
}
if (!Permissions.skillEnabled(player, skillType)) {
return;
}
McMMOPlayerXpGainEvent event = new McMMOPlayerXpGainEvent(player, skillType, xp);
mcMMO.p.getServer().getPluginManager().callEvent(event);