From 076846d74e1cd8b09dd6fddd6dc8c4b3843113c7 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 27 Sep 2016 20:24:50 +0200 Subject: [PATCH] Fix error when a book doesn't have a title (e.g. book and quill) --- src/main/java/de/epiceric/shopchest/language/LanguageUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/epiceric/shopchest/language/LanguageUtils.java b/src/main/java/de/epiceric/shopchest/language/LanguageUtils.java index f95341a..bb0ce74 100644 --- a/src/main/java/de/epiceric/shopchest/language/LanguageUtils.java +++ b/src/main/java/de/epiceric/shopchest/language/LanguageUtils.java @@ -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()) {