mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-23 11:07:05 +01:00
Added null checks for Hologram in WorldGuardListener
This commit is contained in:
parent
39822fe8df
commit
d2b75295ca
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user