Package net.citizensnpcs.guards

Examples of net.citizensnpcs.guards.Guard.target()


            if (entity.isDead())
            {
                return false;
            }
           
            guard.target(entity, npc);
            return true;
        }
        return false;
    }
View Full Code Here


    }

    @Override
    public void onDamage(HumanNPC npc, LivingEntity attacker) {
        Guard guard = npc.getType("guard");
        guard.target(attacker, npc);
    }

    private void startReturning(HumanNPC npc) {
        PathUtils.createPath(npc, npc.getBaseLocation(), -1, Settings.getInt("MaxStationaryReturnTicks"));
    }
View Full Code Here

        double range = Settings.getDouble("PathfindingRange");
        if (guard.isAggressive()
                && LocationUtils.withinRange(npc.getLocation(), player.getLocation(), guard.getProtectionRadius())) {
            LivingEntity entity = Targeter.findTarget(Targeter.getNearby(player, guard.getProtectionRadius()), npc);
            if (entity != null && !entity.isDead()) {
                guard.target(entity, npc);
                return true;
            } else if (npc.getHandle().getTarget() != player) {
                PathUtils.target(npc, player, false, -1, -1, range);
            }
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.