I am using Spigot 1.14 and when I try to click in the inventory or outside the inventory where there is no item I get an error.
I have tried with different methods such as:
e.getCurrentItem().getItemMeta().getDisplayName()
e.getCurrentItem().getItemMeta().hasDisplayName()
and some other methods but none of them seem to work.
if (e.getCurrentItem().getItemMeta().getDisplayName() != null && (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eMystery Box"))) {
When I click outside the inventory or in the inventory where there is no item I get this error message: https://pastebin.com/v0wDB2gp
Saying that it could not pass the inventory click event.