From d88afaf69640cadbee5650ccc397c01c102d80d4 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 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 7c39d066b..c3fec7d94 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java @@ -490,11 +490,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)) {