diff --git a/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java b/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java index 94d9c093..01ada1c5 100644 --- a/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java +++ b/MMOCore-Dist/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java @@ -39,7 +39,7 @@ public class PlayerListener implements Listener { */ @EventHandler public void b(InventoryClickEvent event) { - if (event.getInventory().getHolder() instanceof PluginInventory) + if (event.getInventory().getHolder() instanceof PluginInventory&&event.getCurrentItem()!=null) ((PluginInventory) event.getInventory().getHolder()) .whenClicked(new InventoryClickContext(event.getRawSlot(), event.getCurrentItem(), event.getClick(), event, event.getInventory())); }