Package net.citizensnpcs.api.ai

Examples of net.citizensnpcs.api.ai.Navigator


        // Go through all the entities and make them either attack
        // the target or stop attacking

        for (dEntity entity : entities) {
            if (entity.isNPC()) {
                Navigator nav = entity.getDenizenNPC().getCitizen().getNavigator();

                if (cancel.equals(false)) {
                    nav.setTarget(target.getBukkitEntity(), true);
                }
                else {
                    // Only cancel navigation if the NPC is attacking something
                    if (nav.isNavigating()
                            && nav.getTargetType().equals(TargetType.ENTITY)
                            && nav.getEntityTarget().isAggressive()) {

                        nav.cancelNavigation();
                    }
                }
            }
            else {
                if (cancel.equals(false)) {
View Full Code Here

TOP

Related Classes of net.citizensnpcs.api.ai.Navigator

Copyright © 2018 www.massapicom. 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.