From f516b78776ce36321006826278226445c0cb767f Mon Sep 17 00:00:00 2001 From: Eric Date: Sun, 5 Aug 2018 11:54:52 +0200 Subject: [PATCH] Fix NPE when confirming buy or sell Fixes #202 --- .../de/epiceric/shopchest/listeners/ShopInteractListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java index f2dae78..effce06 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/ShopInteractListener.java @@ -397,9 +397,9 @@ public class ShopInteractListener implements Listener { } else { Shop shop = shopUtils.getShop(b.getLocation()); - boolean confirmed = needsConfirmation.containsKey(p.getUniqueId()) && needsConfirmation.get(p.getUniqueId()).contains(shop.getID()); - if (shop != null) { + boolean confirmed = needsConfirmation.containsKey(p.getUniqueId()) && needsConfirmation.get(p.getUniqueId()).contains(shop.getID()); + if (e.getAction() == Action.LEFT_CLICK_BLOCK && p.isSneaking() && Utils.hasAxeInHand(p)) { return; }