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,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