mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-14 23:15:10 +01: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