Fixed bug for Inventory

This commit is contained in:
Ka0rX 2022-10-28 21:56:16 +02:00
parent 29aebdc2a1
commit b1797f30ea

View File

@ -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()));
}