Fix NPE when confirming buy or sell

Fixes #202
This commit is contained in:
Eric 2018-08-05 11:54:52 +02:00
parent 86322a1198
commit f516b78776
1 changed files with 2 additions and 2 deletions

View File

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