mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-22 18:32:24 +00:00
Fix error when a book doesn't have a title (e.g. book and quill)
This commit is contained in:
parent
c9c5b5b37d
commit
076846d74e
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user