From a7a7d48d9284eafed197ec88addcd67e0c1595b4 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 1 Nov 2021 20:06:49 +0100 Subject: [PATCH] Fix NPE --- SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java b/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java index ff18b19..9c52ee3 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SWInventory.java @@ -103,7 +103,7 @@ public class SWInventory implements Listener { } public void setCallback(int pos, InvCallback c) { - callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent.getClick())); + callbacks.put(pos, inventoryClickEvent -> c.clicked(inventoryClickEvent == null ? null : inventoryClickEvent.getClick())); } public void setItemEvent(int pos, ItemStack itemStack, Consumer c) {