Fix item name for potions and some other items

This commit is contained in:
Eric 2018-07-26 14:20:49 +02:00
parent 3c0790d670
commit 9a953f88f3

View File

@ -2141,7 +2141,7 @@ public class LanguageUtils {
if (stack.hasItemMeta()) { if (stack.hasItemMeta()) {
ItemMeta meta = stack.getItemMeta(); ItemMeta meta = stack.getItemMeta();
if (meta.getDisplayName() != null) { if (meta.getDisplayName() != null && !meta.getDisplayName().isEmpty()) {
return meta.getDisplayName(); return meta.getDisplayName();
} else if (meta instanceof BookMeta && ((BookMeta) meta).hasTitle()) { } else if (meta instanceof BookMeta && ((BookMeta) meta).hasTitle()) {
return ((BookMeta) meta).getTitle(); return ((BookMeta) meta).getTitle();