From 3403aef37d34d75544d5eec475b69a08179e7cf0 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Fri, 23 May 2014 17:03:02 +0200 Subject: [PATCH] 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 --- .../gmail/nossr50/util/scoreboards/ScoreboardWrapper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java index 6dcde68d8..e8343dcba 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java @@ -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; - } + powerLevel += level; // TODO: Verify that this is what we want - calculated in power level but not displayed if (!skill.getPermissions(player)) {