From d2b75295cae6a0298b50fde6b5475a3f172a3612 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 17 Mar 2017 15:00:35 +0100 Subject: [PATCH] Added null checks for Hologram in WorldGuardListener --- .../de/epiceric/shopchest/listeners/WorldGuardListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/epiceric/shopchest/listeners/WorldGuardListener.java b/src/main/java/de/epiceric/shopchest/listeners/WorldGuardListener.java index 7e62663..55c6a7f 100644 --- a/src/main/java/de/epiceric/shopchest/listeners/WorldGuardListener.java +++ b/src/main/java/de/epiceric/shopchest/listeners/WorldGuardListener.java @@ -91,7 +91,7 @@ public class WorldGuardListener implements Listener { return; for (Shop shop : plugin.getShopUtils().getShops()) { - if (shop.getHologram().contains((ArmorStand) e)) { + if (shop.getHologram() != null && shop.getHologram().contains((ArmorStand) e)) { if (isAllowed(player, shop.getLocation(), Action.RIGHT_CLICK_BLOCK)) { event.setAllowed(true); orig.setCancelled(false); @@ -120,7 +120,7 @@ public class WorldGuardListener implements Listener { return; for (Shop shop : plugin.getShopUtils().getShops()) { - if (shop.getHologram().contains((ArmorStand) e)) { + if (shop.getHologram() != null && shop.getHologram().contains((ArmorStand) e)) { if (isAllowed(player, shop.getLocation(), Action.LEFT_CLICK_BLOCK)) { event.setAllowed(true); orig.setCancelled(false);