mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 16:29:39 +00:00
Better Formatting for Tooltips
This commit is contained in:
1 parent
90c3fab6c7
commit
53adb4c9a5
2 files changed
+63
-2
No files matched your search
@@ -148,7 +148,6 @@ public class ItemAttributeHelper {
|
||||
List<String> newTooltips = new ArrayList<>();
|
||||
if (!tooltip.isEmpty()) {
|
||||
newTooltips.add(tooltip.get(0));
|
||||
newTooltips.add("");
|
||||
}
|
||||
|
||||
// Lists for non–magic attributes
|
||||
@@ -286,9 +285,10 @@ public class ItemAttributeHelper {
|
||||
if (section == AttributeDefinition.AttributeSection.MODIFIER || section == AttributeDefinition.AttributeSection.INFO) {
|
||||
String sign = value >= 0 ? "+" : "";
|
||||
String color = value >= 0 ? EnumChatFormatting.GREEN.toString() : EnumChatFormatting.RED.toString();
|
||||
String valueString = color + sign + formattedValue + EnumChatFormatting.GRAY;
|
||||
String valueString = color + sign + formattedValue;
|
||||
if (def != null && def.getValueType() == AttributeValueType.PERCENT)
|
||||
valueString += "%";
|
||||
valueString += EnumChatFormatting.GRAY;
|
||||
return valueString + " " + displayName;
|
||||
} else {
|
||||
if (def != null)
|
||||
|
||||
Reference in new issue
Block a user