Fix "ugly" enchant name. (#1858)

Enchant names did not have a touch of Util#prettifyText code.
This commit is contained in:
BONNe 2021-09-23 05:35:22 +03:00 committed by GitHub
parent 29fa03976c
commit 16d5775c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ public class LangUtilsHook extends Hook {
public static String getEnchantDisplayName(Enchantment ench, int level, User user) {
return hooked
? LanguageHelper.getEnchantmentDisplayName(ench, level, getUserLocale(user))
: ench.getKey().getKey() + " " + level;
: Util.prettifyText(ench.getKey().getKey()) + " " + level;
}
/**
@ -221,7 +221,7 @@ public class LangUtilsHook extends Hook {
public static String getEnchantDisplayName(Entry<Enchantment, Integer> entry, User user) {
return hooked
? LanguageHelper.getEnchantmentDisplayName(entry, getUserLocale(user))
: entry.getKey().getKey().getKey() + " " + entry.getValue();
: Util.prettifyText(entry.getKey().getKey().getKey()) + " " + entry.getValue();
}
/**
@ -234,7 +234,7 @@ public class LangUtilsHook extends Hook {
public static String getEnchantName(Enchantment enchant, User user) {
return hooked
? LanguageHelper.getEnchantmentName(enchant, getUserLocale(user))
: enchant.getKey().getKey();
: Util.prettifyText(enchant.getKey().getKey());
}
/**