Don't display JSON hover if it doesn't exist.

This commit is contained in:
Aust1n46 2021-07-30 22:35:41 -04:00
parent 4b98ee241f
commit 408fe7c90d

View File

@ -163,8 +163,10 @@ public class Format {
hover += Format.FormatStringAll(st) + "\n";
}
}
hover = Format.FormatStringAll(
PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), hover.substring(0, hover.length() - 1)));
if(!hover.isEmpty()) {
hover = Format.FormatStringAll(
PlaceholderAPI.setBracketPlaceholders(icp.getPlayer(), hover.substring(0, hover.length() - 1)));
}
temp += convertToJsonColors(lastCode + placeholder,
",\"clickEvent\":{\"action\":\"" + action + "\",\"value\":\"" + text
+ "\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":["