mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
allow "owned" road mobs to be killed as well
(those that are leashed, being ridden, etc)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user