From 8f1b2a9d2a82194c1e4077d25b6572656d424fc4 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 14 Aug 2020 14:21:45 +0100 Subject: [PATCH] fix pve against animals on other plots and roads --- .../com/plotsquared/bukkit/util/BukkitEntityUtil.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEntityUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEntityUtil.java index d5ef32ba3..c11bcc234 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEntityUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitEntityUtil.java @@ -272,11 +272,12 @@ public class BukkitEntityUtil { } } else if (roadFlags && (area.getRoadFlag(AnimalAttackFlag.class) || area .getFlag(PveFlag.class))) { - if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { - MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, - "plots.admin.pve." + stub); - return false; - } + return true; + } + if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { + MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, + "plots.admin.pve." + stub); + return false; } } else if (EntityCategories.VEHICLE .contains(entityType)) { // Vehicles are managed in vehicle destroy event