Skip to content

Commit

Permalink
Fix double plus in lore when adding some trait modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
Archy-X committed Dec 14, 2024
1 parent 4380fd7 commit 2ff2983
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ public void addModifierLore(ModifierType type, NamespaceIdentified identified, d
} else {
formatValue = NumberUtil.format1(Math.abs(value));
}
if (formatValue.startsWith("+")) { // Prevent double plus sign in lore
formatValue = formatValue.substring(1);
}
lore.add(0, plugin.getMessageProvider().applyFormatting(TextUtil.replace(plugin.getMsg(message, locale),
"{stat}", trait.getDisplayName(locale),
"{value}", formatValue,
Expand Down

0 comments on commit 2ff2983

Please sign in to comment.