mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
allow "owned" road mobs to be killed as well
(those that are leashed, being ridden, etc)
This commit is contained in:
parent
540f4c0958
commit
b4f3e85001
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user