allow op use other shop's controll panel

Former-commit-id: a04aa98d00936e41f6e97dc1ad2bb79b26e6b027 [formerly 89e9ca76c42d3f36a3d2ebcd51887cfd47d5d7eb]
Former-commit-id: 71c5a7fce46c4b5dfeaa87e3f410911f5f0baf2f
This commit is contained in:
jho5245 authored and GitHub committed 2019-11-17 14:59:33 +09:00
1 parent 843e271687
commit c8ab2b58d4
1 file changed
+2 -2
@@ -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;
}