From 673436a5b7b67cff7c951078c192c15390b64be5 Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 14 Jun 2019 15:57:32 +0300 Subject: [PATCH] Finally fixed NPEs in PanelListenerManager tests (#765) Tests failing because 'getClickedInventory()' was not defined there --- .../world/bentobox/bentobox/listeners/PanelListenerManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/listeners/PanelListenerManager.java b/src/main/java/world/bentobox/bentobox/listeners/PanelListenerManager.java index 95c4b710e..9284ee325 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/PanelListenerManager.java +++ b/src/main/java/world/bentobox/bentobox/listeners/PanelListenerManager.java @@ -33,7 +33,7 @@ public class PanelListenerManager implements Listener { // Open the inventory panel that this player has open (they can only ever have one) if (openPanels.containsKey(user.getUniqueId()) && - openPanels.get(user.getUniqueId()).getInventory().equals(event.getClickedInventory())) { + openPanels.get(user.getUniqueId()).getInventory().equals(event.getInventory())) { // Cancel the event. If they don't want it to be cancelled then the click handler(s) should // uncancel it. If gui was from our environment, then cancel event anyway. event.setCancelled(true);