mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-09 20:21:07 +00: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;
|
return;
|
||||||
|
|
||||||
for (Shop shop : plugin.getShopUtils().getShops()) {
|
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)) {
|
if (isAllowed(player, shop.getLocation(), Action.RIGHT_CLICK_BLOCK)) {
|
||||||
event.setAllowed(true);
|
event.setAllowed(true);
|
||||||
orig.setCancelled(false);
|
orig.setCancelled(false);
|
||||||
@ -120,7 +120,7 @@ public class WorldGuardListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (Shop shop : plugin.getShopUtils().getShops()) {
|
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)) {
|
if (isAllowed(player, shop.getLocation(), Action.LEFT_CLICK_BLOCK)) {
|
||||||
event.setAllowed(true);
|
event.setAllowed(true);
|
||||||
orig.setCancelled(false);
|
orig.setCancelled(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user