From bb6e75eef96eb2533428e560fee618e5d21622ad Mon Sep 17 00:00:00 2001 From: Maik E Date: Sun, 7 Jan 2024 19:04:30 +0100 Subject: [PATCH] Shortened strings weren't stripped before. --- .../ItemNaming/PriorityItemDisplayNameShortener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/Acrobot/ChestShop/ItemNaming/PriorityItemDisplayNameShortener.java b/src/main/java/com/Acrobot/ChestShop/ItemNaming/PriorityItemDisplayNameShortener.java index 29bacbcac..ccd9b3845 100644 --- a/src/main/java/com/Acrobot/ChestShop/ItemNaming/PriorityItemDisplayNameShortener.java +++ b/src/main/java/com/Acrobot/ChestShop/ItemNaming/PriorityItemDisplayNameShortener.java @@ -53,14 +53,14 @@ public String shorten(String string, int length) { StringShortenerPairHolder value = integerStringShortenerPairHolderEntry.getValue(); result = value.apply(result); if (result.length() <= length) - return StringUtil.capitalizeFirstLetter(result); + return StringUtil.capitalizeFirstLetter(result).strip(); strippedResult = StringUtil.stripWhitespaces(result); if (strippedResult.length() <= length) return strippedResult; } - return StringUtil.capitalizeFirstLetter(result); + return StringUtil.capitalizeFirstLetter(result).strip(); } private static class StringShortenerPairHolder {