Fix error when a book doesn't have a title (e.g. book and quill)

This commit is contained in:
Eric 2016-09-27 20:24:50 +02:00
parent c9c5b5b37d
commit 076846d74e

View File

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