Skip to content

Commit d685569

Browse files
committed
Cleaned up goal xp calculation.
1 parent 08daaeb commit d685569

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/help/commands/subcommands/HelpAccountSubcommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private String formatExperience(Guild guild, HelpAccount account) {
8787
double percentToGoalXp = (currentXp / goalXp) * 100.0;
8888
sb.append(String.format("%.0f / %.0f XP (%.2f%%) until %s\n", currentXp, goalXp, percentToGoalXp, nextRoleAndXp.first().getAsMention()))
8989
.append(String.format("%.0f Total XP\n", account.getExperience()))
90-
.append(StringUtils.buildTextProgressBar(goalXp / currentXp, 12));
90+
.append(StringUtils.buildTextProgressBar(percentToGoalXp / 100.0, 12));
9191
} else {
9292
sb.append(String.format("%.0f Total XP (MAX. LEVEL)", account.getExperience()));
9393
}

0 commit comments

Comments
 (0)