Don't display child skills on scoreboards

This fixes an issue where the scoreboard would not display properly
when using /mcstats or /inspect.

Fixes #2037
This commit is contained in:
TfT_02 2014-05-23 17:03:02 +02:00
parent 53a34c12d2
commit 3403aef37d

View File

@ -494,12 +494,10 @@ public class ScoreboardWrapper {
// Calculate power level here
int powerLevel = 0;
for (SkillType skill : SkillType.values()) { // Include child skills, but not in power level
for (SkillType skill : SkillType.NON_CHILD_SKILLS) { // Don't include child skills, makes the list too long
int level = newProfile.getSkillLevel(skill);
if (!skill.isChildSkill()) {
powerLevel += level;
}
// TODO: Verify that this is what we want - calculated in power level but not displayed
if (!skill.getPermissions(player)) {