diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSkeletons.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSkeletons.java index b96c86b97..5e52a74cd 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSkeletons.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkSkeletons.java @@ -148,10 +148,12 @@ public class PerkSkeletons extends Perk @EventHandler public void TargetCancel(EntityTargetEvent event) { - if (!_minions.containsKey(event.getTarget())) + if (!(event.getTarget() instanceof Player) || !(event.getEntity() instanceof Skeleton)) + { return; + } - if (_minions.get(event.getTarget()).contains(event.getEntity())) + if (_minions.containsKey(event.getTarget()) && _minions.get(event.getTarget()).contains(event.getEntity())) event.setCancelled(true); for (Player player : _minions.keySet()) @@ -227,6 +229,12 @@ public class PerkSkeletons extends Perk skel.setTarget(null); ((CraftSkeleton) skel).getHandle().setGoalTarget(null); } + + // If it's VERY far from the player + if (UtilMath.offset(skel, player) > (range * 3)) + { + skel.teleport(player.getLocation()); + } } } }