diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java index da70a3450..b097ceb1a 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java @@ -898,9 +898,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl if (BukkitUtil.adapt(location).isPlotRoad()) { if (entity instanceof LivingEntity) { LivingEntity livingEntity = (LivingEntity) entity; - if (!livingEntity.isLeashed() || !entity.hasMetadata("keep")) { + if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS || !livingEntity.isLeashed()) + || !entity.hasMetadata("keep")) { Entity passenger = entity.getPassenger(); - if (!(passenger instanceof Player) && entity.getMetadata("keep").isEmpty()) { + if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS + || !(passenger instanceof Player)) && entity.getMetadata("keep").isEmpty()) { if (entity.hasMetadata("ps-tmp-teleport")) { continue; } @@ -911,7 +913,8 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl } } else { Entity passenger = entity.getPassenger(); - if (!(passenger instanceof Player) && entity.getMetadata("keep").isEmpty()) { + if ((Settings.Enabled_Components.KILL_OWNED_ROAD_MOBS + || !(passenger instanceof Player)) && entity.getMetadata("keep").isEmpty()) { if (entity.hasMetadata("ps-tmp-teleport")) { continue; } diff --git a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java index df7a009de..464717951 100644 --- a/Core/src/main/java/com/plotsquared/core/configuration/Settings.java +++ b/Core/src/main/java/com/plotsquared/core/configuration/Settings.java @@ -615,6 +615,8 @@ public class Settings extends Config { @Comment("Processes chunks (trimming, or entity/tile limits) ") public static boolean CHUNK_PROCESSOR = false; @Comment("Kill mobs on roads (Chicken, Cow, etc.)") public static boolean KILL_ROAD_MOBS = false; + @Comment("Also kill any road mobs that are being ridden, or are leashed") public static boolean + KILL_OWNED_ROAD_MOBS = false; @Comment("Kill items on roads (Stick, Paper, etc.)") public static boolean KILL_ROAD_ITEMS = false; @Comment("Kill vehicles on roads (Boat, Minecart, etc.)") public static boolean KILL_ROAD_VEHICLES = false; @Comment("Notify a player of any missed plot comments upon plot entry") public static boolean