mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-23 02:42:31 +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();
|
ItemMeta meta = stack.getItemMeta();
|
||||||
if (meta.getDisplayName() != null) {
|
if (meta.getDisplayName() != null) {
|
||||||
return meta.getDisplayName();
|
return meta.getDisplayName();
|
||||||
} else if (meta instanceof BookMeta) {
|
} else if (meta instanceof BookMeta && ((BookMeta) meta).hasTitle()) {
|
||||||
return ((BookMeta) meta).getTitle();
|
return ((BookMeta) meta).getTitle();
|
||||||
} else if (meta instanceof SkullMeta) {
|
} else if (meta instanceof SkullMeta) {
|
||||||
if (((SkullMeta) meta).hasOwner()) {
|
if (((SkullMeta) meta).hasOwner()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user