fix pve against animals on other plots and roads

This commit is contained in:
dordsor21 2020-08-14 14:21:45 +01:00
parent 924b73f070
commit 8f1b2a9d2a
No known key found for this signature in database
GPG key ID: 1E53E88969FFCF0B

View file

@ -272,12 +272,13 @@ public class BukkitEntityUtil {
} }
} else if (roadFlags && (area.getRoadFlag(AnimalAttackFlag.class) || area } else if (roadFlags && (area.getRoadFlag(AnimalAttackFlag.class) || area
.getFlag(PveFlag.class))) { .getFlag(PveFlag.class))) {
return true;
}
if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) { if (!Permissions.hasPermission(plotPlayer, "plots.admin.pve." + stub)) {
MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT,
"plots.admin.pve." + stub); "plots.admin.pve." + stub);
return false; return false;
} }
}
} else if (EntityCategories.VEHICLE } else if (EntityCategories.VEHICLE
.contains(entityType)) { // Vehicles are managed in vehicle destroy event .contains(entityType)) { // Vehicles are managed in vehicle destroy event
return true; return true;