Don't allow WorldGuard access when sneaking

Sneaking doesn't open a shop chest anymore.
This commit is contained in:
Eric 2018-08-01 16:17:24 +02:00
parent 3678738048
commit 1e02539aab

View File

@ -52,10 +52,6 @@ public class WorldGuardListener implements Listener {
if (shop.getVendor().getUniqueId().equals(player.getUniqueId()) && shop.getShopType() != Shop.ShopType.ADMIN) { if (shop.getVendor().getUniqueId().equals(player.getUniqueId()) && shop.getShopType() != Shop.ShopType.ADMIN) {
return true; return true;
} }
if (!shop.getVendor().getUniqueId().equals(player.getUniqueId()) && player.isSneaking()) {
return player.hasPermission(Permissions.OPEN_OTHER);
}
} }
if (ClickType.getPlayerClickType(player) != null) { if (ClickType.getPlayerClickType(player) != null) {