fix handling empty messages

This commit is contained in:
hyperdefined
2025-01-18 13:06:38 -05:00
parent c68a04851b
commit 98ee84ad13
4 changed files with 13 additions and 3 deletions

View File

@@ -100,6 +100,12 @@ public class ConfigTools {
public Component formatLore(String configName, String placeHolder, Object value) {
String lore = toolStats.config.getString("messages." + configName);
if (lore == null) {
toolStats.logger.warning("Unable to find config message for: messages." + configName);
return null;
}
// if the config message is empty, don't send it
if (lore.isEmpty()) {
return null;
}