From c8ab2b58d41fceee674948e29b58ee94b320b79c Mon Sep 17 00:00:00 2001 From: jho5245 Date: Sun, 17 Nov 2019 14:59:33 +0900 Subject: [PATCH] allow op use other shop's controll panel Former-commit-id: a04aa98d00936e41f6e97dc1ad2bb79b26e6b027 [formerly 89e9ca76c42d3f36a3d2ebcd51887cfd47d5d7eb] Former-commit-id: 71c5a7fce46c4b5dfeaa87e3f410911f5f0baf2f --- .../java/org/maxgamer/quickshop/Listeners/PlayerListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java b/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java index 887541626..927f3bbdb 100644 --- a/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java +++ b/src/main/java/org/maxgamer/quickshop/Listeners/PlayerListener.java @@ -168,8 +168,8 @@ public class PlayerListener implements Listener { } else { block = e.getClickedBlock(); } - if (plugin.getShopManager().getShop(block.getLocation()) != null && plugin.getShopManager().getShop(block - .getLocation()).getOwner().equals(e.getPlayer().getUniqueId())) { + if (plugin.getShopManager().getShop(block.getLocation()) != null && (plugin.getShopManager().getShop(block + .getLocation()).getOwner().equals(e.getPlayer().getUniqueId()) || e.getPlayer().isOp())) { if (plugin.getConfig().getBoolean("shop.sneak-to-control") && !e.getPlayer().isSneaking()) { return; }