mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
fix handling empty messages
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user